summaryrefslogtreecommitdiffstats
path: root/llvm/tools
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools')
-rw-r--r--llvm/tools/llvm-lto/llvm-lto.cpp2
-rw-r--r--llvm/tools/lto/lto.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/llvm/tools/llvm-lto/llvm-lto.cpp b/llvm/tools/llvm-lto/llvm-lto.cpp
index b17f1ea307b..52e45296126 100644
--- a/llvm/tools/llvm-lto/llvm-lto.cpp
+++ b/llvm/tools/llvm-lto/llvm-lto.cpp
@@ -210,7 +210,7 @@ int main(int argc, char **argv) {
// SetMergedModule is true.
if (SetMergedModule && i == BaseArg) {
// Transfer ownership to the code generator.
- CodeGen.setModule(Module.release());
+ CodeGen.setModule(std::move(Module));
} else if (!CodeGen.addModule(Module.get()))
return 1;
}
diff --git a/llvm/tools/lto/lto.cpp b/llvm/tools/lto/lto.cpp
index aebb1c64a31..8f62929b326 100644
--- a/llvm/tools/lto/lto.cpp
+++ b/llvm/tools/lto/lto.cpp
@@ -260,7 +260,7 @@ bool lto_codegen_add_module(lto_code_gen_t cg, lto_module_t mod) {
}
void lto_codegen_set_module(lto_code_gen_t cg, lto_module_t mod) {
- unwrap(cg)->setModule(unwrap(mod));
+ unwrap(cg)->setModule(std::unique_ptr<LTOModule>(unwrap(mod)));
}
bool lto_codegen_set_debug_model(lto_code_gen_t cg, lto_debug_model debug) {
OpenPOWER on IntegriCloud