From 77fefeba3706a3de819f7aab3ce7e87a6e6fbd3e Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Tue, 22 Sep 2015 23:21:00 +0000 Subject: Debug Info: Emit the dwo_name only in skeleton CUs, not in DWOs. llvm-svn: 248340 --- llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp') diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 31d73a9035f..e218b01353a 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -459,12 +459,14 @@ DwarfDebug::constructDwarfCompileUnit(const DICompileUnit *DIUnit) { else NewCU.initSection(Asm->getObjFileLowering().getDwarfInfoSection()); - // Module debugging: This is a prefabricated skeleton CU. if (DIUnit->getDWOId()) { + // This CU is either a clang module DWO or a skeleton CU. NewCU.addUInt(Die, dwarf::DW_AT_GNU_dwo_id, dwarf::DW_FORM_data8, DIUnit->getDWOId()); - NewCU.addString(Die, dwarf::DW_AT_GNU_dwo_name, - DIUnit->getSplitDebugFilename()); + if (!DIUnit->getSplitDebugFilename().empty()) + // This is a prefabricated skeleton CU. + NewCU.addString(Die, dwarf::DW_AT_GNU_dwo_name, + DIUnit->getSplitDebugFilename()); } CUMap.insert(std::make_pair(DIUnit, &NewCU)); -- cgit v1.2.3