[llvm-commits] [llvm] r90498 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Devang Patel
dpatel at apple.com
Thu Dec 3 15:46:58 PST 2009
Author: dpatel
Date: Thu Dec 3 17:46:57 2009
New Revision: 90498
URL: http://llvm.org/viewvc/llvm-project?rev=90498&view=rev
Log:
Insert composite type DIE into the map before processing type fields. This allows fields to find their context DIE from the map.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=90498&r1=90497&r2=90498&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Thu Dec 3 17:46:57 2009
@@ -758,6 +758,7 @@
// 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 @@
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.
More information about the llvm-commits
mailing list