diff options
author | Adrian Prantl <aprantl@apple.com> | 2015-09-22 23:21:00 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2015-09-22 23:21:00 +0000 |
commit | 77fefeba3706a3de819f7aab3ce7e87a6e6fbd3e (patch) | |
tree | 77125d14da0165292e0e3611a39e6bf6acb59878 /llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | |
parent | 2e4ff97cb73952df1774a81599af0a8453652efa (diff) | |
download | bcm5719-llvm-77fefeba3706a3de819f7aab3ce7e87a6e6fbd3e.tar.gz bcm5719-llvm-77fefeba3706a3de819f7aab3ce7e87a6e6fbd3e.zip |
Debug Info: Emit the dwo_name only in skeleton CUs, not in DWOs.
llvm-svn: 248340
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
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)); |