diff options
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/IR/DIBuilder.cpp | 4 | ||||
-rw-r--r-- | llvm/lib/IR/DebugInfo.cpp | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp index 6db54d2fafb..f9ea545483e 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp @@ -1083,7 +1083,7 @@ void CompileUnit::constructTypeDIE(DIE &Buffer, DICompositeType CTy) { if (CTy.isAppleBlockExtension()) addFlag(&Buffer, dwarf::DW_AT_APPLE_block); - DICompositeType ContainingType = CTy.getContainingType(); + DICompositeType ContainingType(DD->resolve(CTy.getContainingType())); if (DIDescriptor(ContainingType).isCompositeType()) addDIEEntry(&Buffer, dwarf::DW_AT_containing_type, dwarf::DW_FORM_ref4, getOrCreateTypeDIE(DIType(ContainingType))); diff --git a/llvm/lib/IR/DIBuilder.cpp b/llvm/lib/IR/DIBuilder.cpp index d58a9dcd7a9..72205f67873 100644 --- a/llvm/lib/IR/DIBuilder.cpp +++ b/llvm/lib/IR/DIBuilder.cpp @@ -626,7 +626,7 @@ DICompositeType DIBuilder::createClassType(DIDescriptor Context, StringRef Name, DerivedFrom, Elements, ConstantInt::get(Type::getInt32Ty(VMContext), 0), - VTableHolder, + DIType(VTableHolder).generateRef(), TemplateParams, UniqueIdentifier.empty() ? NULL : MDString::get(VMContext, UniqueIdentifier) }; @@ -663,7 +663,7 @@ DICompositeType DIBuilder::createStructType(DIDescriptor Context, DerivedFrom, Elements, ConstantInt::get(Type::getInt32Ty(VMContext), RunTimeLang), - VTableHolder, + DIType(VTableHolder).generateRef(), NULL, UniqueIdentifier.empty() ? NULL : MDString::get(VMContext, UniqueIdentifier) }; diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp index 70b4257caeb..8a6f006d323 100644 --- a/llvm/lib/IR/DebugInfo.cpp +++ b/llvm/lib/IR/DebugInfo.cpp @@ -497,7 +497,7 @@ bool DICompositeType::Verify() const { // Make sure DerivedFrom @ field 9 and ContainingType @ field 12 are MDNodes. if (!fieldIsMDNode(DbgNode, 9)) return false; - if (!fieldIsMDNode(DbgNode, 12)) + if (!fieldIsTypeRef(DbgNode, 12)) return false; // Make sure the type identifier at field 14 is MDString, it can be null. @@ -721,7 +721,7 @@ DITypeRef DIType::generateRef() { /// \brief Set the containing type. void DICompositeType::setContainingType(DICompositeType ContainingType) { TrackingVH<MDNode> N(*this); - N->replaceOperandWith(12, ContainingType); + N->replaceOperandWith(12, ContainingType.generateRef()); DbgNode = N; } |