[PATCH] D31921: Object: Factor out the code for creating the irsymtab for an arbitrary bitcode file.
Teresa Johnson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 7 12:19:11 PDT 2017
tejohnson added inline comments.
================
Comment at: llvm/include/llvm/Object/IRObjectFile.h:67
+
+namespace irsymtab {
+
----------------
why have this in the irsymtab namespace and not object? My main motivation for the move here is that irsymtab doesn't seem like the right namespace/layer for having the main entry point reading/building the full bitcode file contents. Or a new namespace (e.g. bitcodefile or bitcodeobject or the like).
================
Comment at: llvm/include/llvm/Object/IRSymtab.h:322
+/// for the irsymtab are owned by Symtab and Strtab.
+struct FileContents {
+ SmallVector<char, 0> Symtab, Strtab;
----------------
Maybe IRSymtabContents? I.e. this doesn't contain the full contents of the bitcode file.
================
Comment at: llvm/include/llvm/Object/IRSymtab.h:328
+/// Reads the contents of a bitcode file, creating its irsymtab if necessary.
+Expected<FileContents> readBitcode(ArrayRef<BitcodeModule> Mods);
+
----------------
maybe readIRSymtab?
https://reviews.llvm.org/D31921
More information about the llvm-commits
mailing list