diff options
author | Mehdi Amini <mehdi.amini@apple.com> | 2016-08-16 05:46:05 +0000 |
---|---|---|
committer | Mehdi Amini <mehdi.amini@apple.com> | 2016-08-16 05:46:05 +0000 |
commit | cdbcbf7477c40cc27f85370088221ddf4759c2e4 (patch) | |
tree | aff9e7e7c824f5744f48c34278ade2dc27846c41 /llvm/lib/LTO/ThinLTOCodeGenerator.cpp | |
parent | 19b84a02247cc805bd720b2b3f0cc9162438998e (diff) | |
download | bcm5719-llvm-cdbcbf7477c40cc27f85370088221ddf4759c2e4.tar.gz bcm5719-llvm-cdbcbf7477c40cc27f85370088221ddf4759c2e4.zip |
[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
Diffstat (limited to 'llvm/lib/LTO/ThinLTOCodeGenerator.cpp')
-rw-r--r-- | llvm/lib/LTO/ThinLTOCodeGenerator.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/LTO/ThinLTOCodeGenerator.cpp b/llvm/lib/LTO/ThinLTOCodeGenerator.cpp index 9224f726cd9..dfe3de0ffb6 100644 --- a/llvm/lib/LTO/ThinLTOCodeGenerator.cpp +++ b/llvm/lib/LTO/ThinLTOCodeGenerator.cpp @@ -578,7 +578,7 @@ void ThinLTOCodeGenerator::gatherImportedSummariesForModule( ExportLists); llvm::gatherImportedSummariesForModule(ModulePath, ModuleToDefinedGVSummaries, - ImportLists, + ImportLists[ModulePath], ModuleToSummariesForIndex); } @@ -601,7 +601,7 @@ void ThinLTOCodeGenerator::emitImports(StringRef ModulePath, ExportLists); std::error_code EC; - if ((EC = EmitImportsFiles(ModulePath, OutputName, ImportLists))) + if ((EC = EmitImportsFiles(ModulePath, OutputName, ImportLists[ModulePath]))) report_fatal_error(Twine("Failed to open ") + OutputName + " to save imports lists\n"); } |