diff options
| author | Manman Ren <manman.ren@gmail.com> | 2014-07-28 19:33:20 +0000 |
|---|---|---|
| committer | Manman Ren <manman.ren@gmail.com> | 2014-07-28 19:33:20 +0000 |
| commit | 1a125c95deb911abf03587db35e9173fcb9f2b9e (patch) | |
| tree | 215be25071a55bbb3cd8fa8c18f7a073250cd0d1 /llvm/lib/IR/DebugInfo.cpp | |
| parent | 9d7323eca38f6ad0722306713ab7c5df5cf43b38 (diff) | |
| download | bcm5719-llvm-1a125c95deb911abf03587db35e9173fcb9f2b9e.tar.gz bcm5719-llvm-1a125c95deb911abf03587db35e9173fcb9f2b9e.zip | |
[Debug Info] add a template class DITypedArray.
Typedef DIArray to DITypedArray<DIDescriptor>. Also typedef DITypeArray as
DITypedArray<DITypeRef>.
This is the third of a series of patches to handle type uniqueing of the
type array for a subroutine type.
This commit should have no functionality change.
llvm-svn: 214115
Diffstat (limited to 'llvm/lib/IR/DebugInfo.cpp')
| -rw-r--r-- | llvm/lib/IR/DebugInfo.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp index 6c06bf18de6..543e8e5b0bd 100644 --- a/llvm/lib/IR/DebugInfo.cpp +++ b/llvm/lib/IR/DebugInfo.cpp @@ -338,12 +338,6 @@ bool DIDescriptor::isImportedEntity() const { // Simple Descriptor Constructors and other Methods //===----------------------------------------------------------------------===// -unsigned DIArray::getNumElements() const { - if (!DbgNode) - return 0; - return DbgNode->getNumOperands(); -} - /// replaceAllUsesWith - Replace all uses of the MDNode used by this /// type with the one in the passed descriptor. void DIType::replaceAllUsesWith(LLVMContext &VMContext, DIDescriptor D) { @@ -676,10 +670,7 @@ static void VerifySubsetOf(const MDNode *LHS, const MDNode *RHS) { #endif /// \brief Set the array of member DITypes. -void DICompositeType::setArrays(DIArray Elements, DIArray TParams) { - assert((!TParams || DbgNode->getNumOperands() == 15) && - "If you're setting the template parameters this should include a slot " - "for that!"); +void DICompositeType::setArraysHelper(MDNode *Elements, MDNode *TParams) { TrackingVH<MDNode> N(*this); if (Elements) { #ifndef NDEBUG |

