[PATCH] D34124: IR: Tweak the API around adding modules to the summary index.

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 13 13:42:02 PDT 2017


tejohnson accepted this revision.
tejohnson added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: llvm/include/llvm/IR/ModuleSummaryIndex.h:694
 
-  /// Add a new module path with the given \p Hash, mapped to the given \p
-  /// ModID, and return an iterator to the entry in the index.
-  ModulePathStringTableTy::iterator
-  addModulePath(StringRef ModPath, uint64_t ModId,
-                ModuleHash Hash = ModuleHash{{0}}) {
-    return ModulePathStringTable.insert(std::make_pair(
-                                            ModPath,
-                                            std::make_pair(ModId, Hash))).first;
+  typedef ModulePathStringTableTy::value_type Module;
+
----------------
I have a preference towards naming this something other than Module, since that name is so frequently used for the IR Module. Consider changing to something like ModuleInfo or something like that? (And if you do so, the change to hasExportedFunctions parameter can be reverted)


https://reviews.llvm.org/D34124





More information about the llvm-commits mailing list