summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorWolfgang Pieb <Wolfgang.Pieb@sony.com>2018-05-10 20:02:34 +0000
committerWolfgang Pieb <Wolfgang.Pieb@sony.com>2018-05-10 20:02:34 +0000
commitf2b6915ed46ebfc28f450b0fa0027b6666ebcb11 (patch)
tree15487910ebf87f90c4735bd81506c8d3f1aca116 /llvm/lib/CodeGen
parentf489e2bfef7fca1959ad7e5cb223edc13cc1bc18 (diff)
downloadbcm5719-llvm-f2b6915ed46ebfc28f450b0fa0027b6666ebcb11.tar.gz
bcm5719-llvm-f2b6915ed46ebfc28f450b0fa0027b6666ebcb11.zip
[DWARF] Fixing a bug in DWARF v5 string offsets tables where the length encoded the contribution
length excluding the table header. Instead it must encode the contribution length minus the length field itself. Reviewer: JDevliegehere Differential Revision: https://reviews.llvm.org/D45922 llvm-svn: 332030
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp
index a3ea96b72ba..f3a3cbdbc74 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp
@@ -36,9 +36,9 @@ void DwarfFile::emitStringOffsetsTableHeader(MCSection *Section) {
// 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 header), the DWARF version and
+ // size (not including the size of the length field), the DWARF version and
// 2 bytes of padding.
- Asm->emitInt32(StrPool.size() * EntrySize);
+ 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
OpenPOWER on IntegriCloud