diff options
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 690ae37674..247cd04eac 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -2976,21 +2976,6 @@ DwarfCompileUnit *DwarfDebug::constructSkeletonCU(const DwarfCompileUnit *CU) { return NewCU; } -// This DIE has the following attributes: DW_AT_comp_dir, DW_AT_dwo_name, -// DW_AT_addr_base. -DwarfTypeUnit *DwarfDebug::constructSkeletonTU(const DwarfTypeUnit *TU) { - - DIE *Die = new DIE(dwarf::DW_TAG_type_unit); - DwarfTypeUnit *NewTU = new DwarfTypeUnit( - TU->getUniqueID(), Die, TU->getCUNode(), Asm, this, &SkeletonHolder); - NewTU->setTypeSignature(TU->getTypeSignature()); - NewTU->initSection( - Asm->getObjFileLowering().getDwarfTypesSection(TU->getTypeSignature())); - - initSkeletonUnit(TU, Die, NewTU); - return NewTU; -} - // Emit the .debug_info.dwo section for separated dwarf. This contains the // compile units that would normally be in debug_info. void DwarfDebug::emitDebugInfoDWO() { @@ -3033,6 +3018,8 @@ void DwarfDebug::addDwarfTypeUnitType(DICompileUnit CUNode, NewTU->addUInt(UnitDie, dwarf::DW_AT_language, dwarf::DW_FORM_data2, CUNode.getLanguage()); + DIE *Die = NewTU->createTypeDIE(CTy); + MD5 Hash; Hash.update(Identifier); // ... take the least significant 8 bytes and return those. Our MD5 @@ -3042,10 +3029,7 @@ void DwarfDebug::addDwarfTypeUnitType(DICompileUnit CUNode, Hash.final(Result); uint64_t Signature = *reinterpret_cast<support::ulittle64_t *>(Result + 8); NewTU->setTypeSignature(Signature); - if (useSplitDwarf()) - NewTU->setSkeleton(constructSkeletonTU(NewTU)); - - NewTU->setType(NewTU->createTypeDIE(CTy)); + NewTU->setType(Die); NewTU->initSection( useSplitDwarf() |