[LTO] Simplify APIs and constify (NFC)
authorMehdi Amini <mehdi.amini@apple.com>
Tue, 16 Aug 2016 05:46:05 +0000 (05:46 +0000)
committerMehdi Amini <mehdi.amini@apple.com>
Tue, 16 Aug 2016 05:46:05 +0000 (05:46 +0000)
commitcdbcbf7477c40cc27f85370088221ddf4759c2e4
treeaff9e7e7c824f5744f48c34278ade2dc27846c41
parent19b84a02247cc805bd720b2b3f0cc9162438998e
[LTO] Simplify APIs and constify (NFC)

Summary:
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.

Reviewers: tejohnson

Subscribers: llvm-commits, mehdi_amini

Differential Revision: https://reviews.llvm.org/D23537

llvm-svn: 278776
llvm/include/llvm/Transforms/IPO/FunctionImport.h
llvm/lib/LTO/LTO.cpp
llvm/lib/LTO/ThinLTOCodeGenerator.cpp
llvm/lib/Transforms/IPO/FunctionImport.cpp