diff options
author | Pavel Labath <labath@google.com> | 2018-07-25 12:52:30 +0000 |
---|---|---|
committer | Pavel Labath <labath@google.com> | 2018-07-25 12:52:30 +0000 |
commit | b4e17c29dde38d8c9052c0d68110f5dfbf5323f2 (patch) | |
tree | dc17ce4dd8d652044d404131a30ef854a95aa838 /llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp | |
parent | f142c965e4145b9f602ab81271b3df25660da1a9 (diff) | |
download | llvm-b4e17c29dde38d8c9052c0d68110f5dfbf5323f2.zip llvm-b4e17c29dde38d8c9052c0d68110f5dfbf5323f2.tar.gz llvm-b4e17c29dde38d8c9052c0d68110f5dfbf5323f2.tar.bz2 |
Revert "dwarfgen: Add support for generating the debug_str_offsets section"
This reverts commit r337910 as it's generating "ambiguous call to
addAttribute" errors on some bots.
Will resubmit once I get a chance to look into the problem.
llvm-svn: 337924
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp index c90bd56..f3a3cbd 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp @@ -28,6 +28,26 @@ void DwarfFile::addUnit(std::unique_ptr<DwarfCompileUnit> U) { CUs.push_back(std::move(U)); } +void DwarfFile::emitStringOffsetsTableHeader(MCSection *Section) { + if (StrPool.empty()) + return; + Asm->OutStreamer->SwitchSection(Section); + unsigned EntrySize = 4; + // FIXME: DWARF64 + // We are emitting the header for a contribution to the string offsets + // table. The header consists of an entry with the contribution's + // size (not including the size of the length field), the DWARF version and + // 2 bytes of padding. + Asm->emitInt32(StrPool.size() * EntrySize + 4); + Asm->emitInt16(Asm->getDwarfVersion()); + Asm->emitInt16(0); + // Define the symbol that marks the start of the contribution. It is + // referenced by most unit headers via DW_AT_str_offsets_base. + // Split units do not use the attribute. + if (StringOffsetsStartSym) + Asm->OutStreamer->EmitLabel(StringOffsetsStartSym); +} + // Emit the various dwarf units to the unit section USection with // the abbreviations going into ASection. void DwarfFile::emitUnits(bool UseOffsets) { |