[PATCH] D27073: Object: Extract a ModuleSymbolTable class from IRObjectFile.

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 30 21:22:54 PST 2016


pcc added a comment.

Not sure if we'll need accessors. I'd expect that clients which need this information (essentially just the symbol table writer, eventually) would just pull the information out of the module that they presumably have. The assertion seems reasonable though.

I don't think I understand why we'd want all of the module asm. I'd have imagined that we would serialize the AsmSymbols along with the IR symbols. Or is that the IR change you were alluding to?



================
Comment at: llvm/lib/Object/ModuleSymbolTable.cpp:40
 
-IRObjectFile::IRObjectFile(MemoryBufferRef Object, std::unique_ptr<Module> Mod)
-    : SymbolicFile(Binary::ID_IR, Object), M(std::move(Mod)) {
-  Mang.reset(new Mangler());
-
+void ModuleSymbolTable::addModule(Module *M) {
   for (Function &F : *M)
----------------
mehdi_amini wrote:
> We should assert that every module added have the same triple as the others.
Sorry, I missed this, will do.


https://reviews.llvm.org/D27073





More information about the llvm-commits mailing list