aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/AsmPrinter/AccelTable.cpp
diff options
context:
space:
mode:
authorIgor Kudrin <ikudrin@accesssoftek.com>2020-09-02 16:12:39 +0700
committerIgor Kudrin <ikudrin@accesssoftek.com>2020-09-02 16:12:39 +0700
commit3445ec9ba718035b27c0140dc1e892be843236f5 (patch)
treeedc622c167e391468b4df535348379c14e41d349 /llvm/lib/CodeGen/AsmPrinter/AccelTable.cpp
parent71eed4808fbc5e5baa016210f727683610139014 (diff)
downloadllvm-3445ec9ba718035b27c0140dc1e892be843236f5.zip
llvm-3445ec9ba718035b27c0140dc1e892be843236f5.tar.gz
llvm-3445ec9ba718035b27c0140dc1e892be843236f5.tar.bz2
[DebugInfo] Emit a 1-byte value as a terminator of entries list in the name index.
As stated in section 6.1.1.2, DWARFv5, p. 142, | The last entry for each name is followed by a zero byte that | terminates the list. There may be gaps between the lists. The patch changes emitting a 4-byte zero value to a 1-byte one, which effectively removes the gap between entry lists, and thus saves approximately 3 bytes per name; the calculation is not exact because the total size of the table is aligned to 4. Differential Revision: https://reviews.llvm.org/D86927
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/AccelTable.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/AccelTable.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AccelTable.cpp b/llvm/lib/CodeGen/AsmPrinter/AccelTable.cpp
index 527ed9e..d7b0ffc 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AccelTable.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AccelTable.cpp
@@ -505,7 +505,7 @@ template <typename DataT> void Dwarf5AccelTableWriter<DataT>::emitData() const {
for (const auto *Value : Hash->Values)
emitEntry(*static_cast<const DataT *>(Value));
Asm->OutStreamer->AddComment("End of list: " + Hash->Name.getString());
- Asm->emitInt32(0);
+ Asm->emitInt8(0);
}
}
}