diff options
author | Teresa Johnson <tejohnson@google.com> | 2016-01-08 17:06:29 +0000 |
---|---|---|
committer | Teresa Johnson <tejohnson@google.com> | 2016-01-08 17:06:29 +0000 |
commit | 1b00f2d99abe369cede650af4c98f0db2aad9abe (patch) | |
tree | df838e367da9c967fd97c81f32691506c0eddab8 /llvm/lib/Linker/LinkModules.cpp | |
parent | d4db94846ad6c3db02d82dca0aa7af2df8296f20 (diff) | |
download | bcm5719-llvm-1b00f2d99abe369cede650af4c98f0db2aad9abe.tar.gz bcm5719-llvm-1b00f2d99abe369cede650af4c98f0db2aad9abe.zip |
[ThinLTO] Use new in-place symbol changes for exporting module
Due to the new in-place ThinLTO symbol handling support added in
r257174, we now invoke renameModuleForThinLTO on the current
module from within the FunctionImport pass.
Additionally, renameModuleForThinLTO no longer needs to return the
Module as it is performing the renaming in place on the one provided.
This commit will be immediately preceeded by a companion clang patch to
remove its invocation of renameModuleForThinLTO.
llvm-svn: 257181
Diffstat (limited to 'llvm/lib/Linker/LinkModules.cpp')
-rw-r--r-- | llvm/lib/Linker/LinkModules.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/llvm/lib/Linker/LinkModules.cpp b/llvm/lib/Linker/LinkModules.cpp index 653f639f28e..6ffa71e1477 100644 --- a/llvm/lib/Linker/LinkModules.cpp +++ b/llvm/lib/Linker/LinkModules.cpp @@ -863,13 +863,9 @@ bool Linker::linkModules(Module &Dest, std::unique_ptr<Module> Src, return L.linkInModule(std::move(Src), Flags); } -std::unique_ptr<Module> -llvm::renameModuleForThinLTO(std::unique_ptr<Module> M, - const FunctionInfoIndex *Index) { - ThinLTOGlobalProcessing ThinLTOProcessing(*M, Index); - if (ThinLTOProcessing.run()) - return nullptr; - return M; +bool llvm::renameModuleForThinLTO(Module &M, const FunctionInfoIndex *Index) { + ThinLTOGlobalProcessing ThinLTOProcessing(M, Index); + return ThinLTOProcessing.run(); } //===----------------------------------------------------------------------===// |