diff options
| author | Devang Patel <dpatel@apple.com> | 2009-12-03 23:46:57 +0000 |
|---|---|---|
| committer | Devang Patel <dpatel@apple.com> | 2009-12-03 23:46:57 +0000 |
| commit | 3b666fef6788aef532065fc561ae85723bac77e7 (patch) | |
| tree | dc8f91d3ceb90fdf658d64702b0513d974ac1ca3 /llvm | |
| parent | fa23223d4a4111d25d555e8cf0a9f44d9589a533 (diff) | |
| download | bcm5719-llvm-3b666fef6788aef532065fc561ae85723bac77e7.tar.gz bcm5719-llvm-3b666fef6788aef532065fc561ae85723bac77e7.zip | |
Insert composite type DIE into the map before processing type fields. This allows fields to find their context DIE from the map.
llvm-svn: 90498
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index e16bc2adf2c..bf54efc9df2 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/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. |

