summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-link
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2015-12-16 23:16:33 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2015-12-16 23:16:33 +0000
commit434e95618176ee4eb29237859eb6fa04e3c52e06 (patch)
tree9e9ad1c9ffba868edee4811937a0703a27b32755 /llvm/tools/llvm-link
parentbfba572425bd2f88c7ae406efe350c323812643f (diff)
downloadbcm5719-llvm-434e95618176ee4eb29237859eb6fa04e3c52e06.tar.gz
bcm5719-llvm-434e95618176ee4eb29237859eb6fa04e3c52e06.zip
Change linkInModule to take a std::unique_ptr.
Passing in a std::unique_ptr should help find errors when the module is used after being linked into another module. llvm-svn: 255842
Diffstat (limited to 'llvm/tools/llvm-link')
-rw-r--r--llvm/tools/llvm-link/llvm-link.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/tools/llvm-link/llvm-link.cpp b/llvm/tools/llvm-link/llvm-link.cpp
index 8030f4c9037..326ecba3ae9 100644
--- a/llvm/tools/llvm-link/llvm-link.cpp
+++ b/llvm/tools/llvm-link/llvm-link.cpp
@@ -204,7 +204,7 @@ static bool importFunctions(const char *argv0, LLVMContext &Context,
// Link in the specified function.
DenseSet<const GlobalValue *> FunctionsToImport;
FunctionsToImport.insert(F);
- if (L.linkInModule(*M, Linker::Flags::None, Index.get(),
+ if (L.linkInModule(std::move(M), Linker::Flags::None, Index.get(),
&FunctionsToImport))
return false;
}
@@ -245,7 +245,7 @@ static bool linkFiles(const char *argv0, LLVMContext &Context, Linker &L,
if (Verbose)
errs() << "Linking in '" << File << "'\n";
- if (L.linkInModule(*M, ApplicableFlags, Index.get()))
+ if (L.linkInModule(std::move(M), ApplicableFlags, Index.get()))
return false;
// All linker flags apply to linking of subsequent files.
ApplicableFlags = Flags;
OpenPOWER on IntegriCloud