diff options
author | Eric Christopher <echristo@gmail.com> | 2013-03-29 20:23:02 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2013-03-29 20:23:02 +0000 |
commit | 6be35037b55d3be27f10432ced473584ba574ca9 (patch) | |
tree | 6f372c84c879ff99a33222e5c88f9375b1b1a8d3 /llvm/lib/CodeGen | |
parent | 30cf851ef2103c2b2afebbd2ac16dc5d65b1da5e (diff) | |
download | bcm5719-llvm-6be35037b55d3be27f10432ced473584ba574ca9.tar.gz bcm5719-llvm-6be35037b55d3be27f10432ced473584ba574ca9.zip |
Move the construction of the skeleton compile unit after the
entire original compile unit has been constructed.
llvm-svn: 178365
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index b169602b0ec..9b65046edcc 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -721,13 +721,6 @@ CompileUnit *DwarfDebug::constructCompileUnit(const MDNode *N) { if (!FirstCU) FirstCU = NewCU; - if (useSplitDwarf()) { - // This should be a unique identifier when we want to build .dwp files. - NewCU->addUInt(Die, dwarf::DW_AT_GNU_dwo_id, dwarf::DW_FORM_data8, 0); - // Now construct the skeleton CU associated. - constructSkeletonCU(N); - } - InfoHolder.addUnit(NewCU); CUMap.insert(std::make_pair(N, NewCU)); @@ -794,6 +787,14 @@ void DwarfDebug::beginModule() { DIArray RetainedTypes = CUNode.getRetainedTypes(); for (unsigned i = 0, e = RetainedTypes.getNumElements(); i != e; ++i) CU->getOrCreateTypeDIE(RetainedTypes.getElement(i)); + // If we're splitting the dwarf out now that we've got the entire + // CU then construct a skeleton CU based upon it. + if (useSplitDwarf()) { + // This should be a unique identifier when we want to build .dwp files. + CU->addUInt(CU->getCUDie(), dwarf::DW_AT_GNU_dwo_id, dwarf::DW_FORM_data8, 0); + // Now construct the skeleton CU associated. + constructSkeletonCU(CUNode); + } } // Tell MMI that we have debug info. |