[PATCH] ELFObjectWriter: optimize suffices in strtab

Sean Silva chisophugis at gmail.com
Tue Apr 29 17:33:55 PDT 2014


================
Comment at: include/llvm/ADT/StringTableBuilder.h:18-19
@@ +17,4 @@
+namespace llvm {
+
+class StringTableBuilder {
+  SmallString<256> StringTable;
----------------
Sean Silva wrote:
> Please add a class comment indicating that this is primarily a convenience for doing suffix deduplication.
also, you probably want to call out the very finicky nature of finalize(), since the behavior of the class changes completely before and after it is called (it would be cleaner and safer to have two separate classes, but I think that might complicate things enough to be a net loss)

http://reviews.llvm.org/D3533






More information about the llvm-commits mailing list