[PATCH] D31838: Bitcode: Add a string table to the bitcode format.

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 11 14:12:39 PDT 2017


vsk added a comment.

I've got a collection of old bitcode files which I'll try recompiling with this patch applied, once the review winds down.



================
Comment at: llvm/tools/llvm-modextract/llvm-modextract.cpp:67
+    Writer.copyStrtab(Ms[ModuleIndex].getStrtab());
+    Out->os() << Header;
     Out->keep();
----------------
I see two places where we need to perform a byte-for-byte copy of a BitcodeModule's buffer, and then copy the strtab. Is there any reason to perform such a copy and not copy the strtab? If not, we could reduce the duplication by adding a 'writeCopyOfModule(BitcodeModule &)' helper to BitcodeWriter.


https://reviews.llvm.org/D31838





More information about the llvm-commits mailing list