diff options
| author | Paul Robinson <paul.robinson@sony.com> | 2018-05-22 17:27:31 +0000 |
|---|---|---|
| committer | Paul Robinson <paul.robinson@sony.com> | 2018-05-22 17:27:31 +0000 |
| commit | 543c0e1d508807c6d0e82cca0748e6b8ccc66948 (patch) | |
| tree | 596bf4046ad8a0f3e6d91d82fecfeb33198880b1 /llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp | |
| parent | 9bfe932c541cdbe8978f399e79ec95bb61e94f71 (diff) | |
| download | bcm5719-llvm-543c0e1d508807c6d0e82cca0748e6b8ccc66948.tar.gz bcm5719-llvm-543c0e1d508807c6d0e82cca0748e6b8ccc66948.zip | |
[DWARFv5] Put the DWO ID in its place.
In DWARF v5, the DWO ID is in the (split/skeleton) CU header, not an
attribute on the CU DIE.
This changes the size of those headers, so use the parsed size whenever
we have one, for simplicitly.
Differential Revision: https://reviews.llvm.org/D47158
llvm-svn: 333004
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp index a4d699496b4..04c206ffea2 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp @@ -855,6 +855,8 @@ void DwarfCompileUnit::emitHeader(bool UseOffsets) { : DD->useSplitDwarf() ? dwarf::DW_UT_skeleton : dwarf::DW_UT_compile; DwarfUnit::emitCommonHeader(UseOffsets, UT); + if (DD->getDwarfVersion() >= 5 && UT != dwarf::DW_UT_compile) + Asm->emitInt64(getDWOId()); } bool DwarfCompileUnit::hasDwarfPubSections() const { |

