[ThinLTO] Use new in-place symbol changes for exporting module
[oota-llvm.git] / lib / Linker / LinkModules.cpp
index 653f639f28e5cbf1e2a13fc1b12689c36680d40a..6ffa71e147790f9d410078181fb666f367bf6024 100644 (file)
@@ -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();
 }
 
 //===----------------------------------------------------------------------===//