[PATCH] D32070: Object: Shrink the size of irsymtab::Symbol by a word. NFCI.

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 17 12:29:27 PDT 2017


tejohnson added inline comments.


================
Comment at: llvm/include/llvm/Object/IRSymtab.h:288
+  return {SymbolRef(Symbols.begin(), Symbols.end(), Uncommons.begin(), this),
+          SymbolRef(Symbols.end(), Symbols.end(), nullptr, this)};
 }
----------------
Should this be Uncommons.end() instead of nullptr? Otherwise, will UncI ever be nullptr allowing the SymbolRef::operator== to detect the end of the symbol_range? I see where we increment UncI, but not how it could be nullptr at the end of the Uncommons range.


================
Comment at: llvm/lib/Object/IRSymtab.cpp:37
   DenseMap<const Comdat *, unsigned> ComdatMap;
-  ModuleSymbolTable Msymtab;
-  SmallPtrSet<GlobalValue *, 8> Used;
----------------
Is the restructuring in this file related to the change to set the new flag? I couldn't figure out how. It looks like a good change, but if unrelated can you commit separately?


https://reviews.llvm.org/D32070





More information about the llvm-commits mailing list