aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp2
-rw-r--r--lib/IR/DIBuilder.cpp4
-rw-r--r--lib/IR/DebugInfo.cpp4
3 files changed, 5 insertions, 5 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
index 6db54d2..f9ea545 100644
--- a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
+++ b/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/lib/IR/DIBuilder.cpp b/lib/IR/DIBuilder.cpp
index d58a9dc..72205f6 100644
--- a/lib/IR/DIBuilder.cpp
+++ b/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/lib/IR/DebugInfo.cpp b/lib/IR/DebugInfo.cpp
index 70b4257..8a6f006 100644
--- a/lib/IR/DebugInfo.cpp
+++ b/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;
}