[PATCH] D31922: Object: Use offset+size as the irsymtab string representation.

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 17 10:40:36 PDT 2017


pcc added a comment.

In https://reviews.llvm.org/D31922#728259, @tejohnson wrote:

> It isn't clear to me why this is needed now but wasn't before. Was it the case that before the names were assumed to be null-terminated, and they will no longer be?


Correct. In https://reviews.llvm.org/D32061 we will start sharing the string table between the module and the irsymtab, and the string table I am adding in https://reviews.llvm.org/D31838 uses non-null-terminated strings.



================
Comment at: llvm/lib/Object/IRSymtab.cpp:33
 
-  StringTableBuilder StrtabBuilder{StringTableBuilder::ELF};
+  StringTableBuilder StrtabBuilder{StringTableBuilder::RAW};
 
----------------
tejohnson wrote:
> How does this change related to the rest of the patch?
Strings in ELF string tables are null terminated, RAW string tables aren't.


https://reviews.llvm.org/D31922





More information about the llvm-commits mailing list