mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2026-07-18 13:15:38 -04:00
Move the sysroot attribute from DIModule to DICompileUnit
[this re-applies c0176916a4824812d25a5a22c4ff7c95857b0cd6 with the correct commit message and phabricator link] This addresses point 1 of PR44213. https://bugs.llvm.org/show_bug.cgi?id=44213 The DW_AT_LLVM_sysroot attribute is used for Clang module debug info, to allow LLDB to import a Clang module from source. Currently it is part of each DW_TAG_module, however, it is the same for all modules in a compile unit. It is more efficient and less ambiguous to store it once in the DW_TAG_compile_unit. This should have no effect on DWARF consumers other than LLDB. Differential Revision: https://reviews.llvm.org/D71732
This commit is contained in:
@@ -1662,6 +1662,8 @@ void ModuleBitcodeWriter::writeDICompileUnit(const DICompileUnit *N,
|
||||
Record.push_back(N->getSplitDebugInlining());
|
||||
Record.push_back(N->getDebugInfoForProfiling());
|
||||
Record.push_back((unsigned)N->getNameTableKind());
|
||||
Record.push_back(N->getRangesBaseAddress());
|
||||
Record.push_back(VE.getMetadataOrNullID(N->getRawSysRoot()));
|
||||
|
||||
Stream.EmitRecord(bitc::METADATA_COMPILE_UNIT, Record, Abbrev);
|
||||
Record.clear();
|
||||
|
||||
Reference in New Issue
Block a user