Multiple APIs were taking a StringMap for the ImportLists containing
the entries for for all the modules while operating on a single entry
for the current module. Instead we can pass the desired ModuleImport
directly. Also some of the APIs were not const, I believe just to be
able to use operator[] on the StringMap.
Details
Diff Detail
Event Timeline
LGTM, thanks. A nit and a comment below.
include/llvm/Transforms/IPO/FunctionImport.h | ||
---|---|---|
117 | Suggest making the argument name here and in EmitImportsFiles "ImportList" to be consistent with some of the other places where a single module's import list is passed. | |
lib/Transforms/IPO/FunctionImport.cpp | ||
449 | There's a behavior difference here in that we used to check here and in EmitImportsFiles whether the path was in the map, but with the new handling we will construct a default entry if it wasn't in the map when we do ImportLists[ModulePath]. I don't think this is a big deal though. |
include/llvm/Transforms/IPO/FunctionImport.h | ||
---|---|---|
117 | Done. |
Suggest making the argument name here and in EmitImportsFiles "ImportList" to be consistent with some of the other places where a single module's import list is passed.