summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/lib/CodeGen/CodeGenAction.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenAction.cpp b/clang/lib/CodeGen/CodeGenAction.cpp
index 771fe008337..abef5432518 100644
--- a/clang/lib/CodeGen/CodeGenAction.cpp
+++ b/clang/lib/CodeGen/CodeGenAction.cpp
@@ -184,7 +184,7 @@ namespace clang {
for (auto &I : LinkModules) {
unsigned LinkFlags = I.first;
CurLinkModule = I.second.get();
- if (Linker::linkModules(*M, *CurLinkModule, LinkFlags))
+ if (Linker::linkModules(*M, std::move(I.second), LinkFlags))
return;
}
@@ -806,7 +806,7 @@ void CodeGenAction::ExecuteAction() {
assert(Index);
// Currently this requires creating a new Module object.
std::unique_ptr<llvm::Module> RenamedModule =
- renameModuleForThinLTO(TheModule, Index.get());
+ renameModuleForThinLTO(std::move(TheModule), Index.get());
if (!RenamedModule)
return;
OpenPOWER on IntegriCloud