[PATCH] D31364: LTO: Reduce memory consumption by creating an in-memory symbol table for InputFiles. NFCI.

Rafael Ávila de Espíndola via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 27 08:38:39 PDT 2017


rafael added inline comments.


================
Comment at: lld/COFF/InputFiles.cpp:347
     Symbol *Sym;
-    if (Flags & object::BasicSymbolRef::SF_Undefined) {
+    if (ObjSym.isUndefined()) {
       Sym = Symtab->addUndefined(SymName, this, false);
----------------
These small utility predicates are awesome. Would you mind committing them first with the current implementation? It would be a nice improvement and make this patch easier to read.


================
Comment at: llvm/include/llvm/Object/IRSymtab.h:31
+
+typedef support::ulittle32_t Word;
+
----------------
why do you use this for Symbol? If we are storing something by value it is better to just use a uint32_t.


https://reviews.llvm.org/D31364





More information about the llvm-commits mailing list