aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2009-12-03 23:46:57 +0000
committerDevang Patel <dpatel@apple.com>2009-12-03 23:46:57 +0000
commitb3235d22e94c21ef00539d83db4d6d65bada48f5 (patch)
treeb0d9046e24779443cf60dc4af5799b19250b0307 /lib/CodeGen
parent1971556cc271710b683bc3ca8327c903791c910f (diff)
Insert composite type DIE into the map before processing type fields. This allows fields to find their context DIE from the map.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90498 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index e16bc2adf2..bf54efc9df 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -758,6 +758,7 @@ void DwarfDebug::addType(CompileUnit *DW_Unit, DIE *Entity, DIType Ty) {
// Construct type.
DIE *Buffer = new DIE(dwarf::DW_TAG_base_type);
+ ModuleCU->insertDIE(Ty.getNode(), Buffer);
if (Ty.isBasicType())
constructTypeDIE(DW_Unit, *Buffer, DIBasicType(Ty.getNode()));
else if (Ty.isCompositeType())
@@ -779,7 +780,6 @@ void DwarfDebug::addType(CompileUnit *DW_Unit, DIE *Entity, DIType Ty) {
DW_Unit->addDie(Buffer);
Entry->setEntry(Buffer);
Entity->addValue(dwarf::DW_AT_type, dwarf::DW_FORM_ref4, Entry);
- ModuleCU->insertDIE(Ty.getNode(), Buffer);
}
/// constructTypeDIE - Construct basic type die from DIBasicType.