aboutsummaryrefslogtreecommitdiffstats
path: root/tools/llvm-link
diff options
context:
space:
mode:
Diffstat (limited to 'tools/llvm-link')
-rw-r--r--tools/llvm-link/Makefile8
-rw-r--r--tools/llvm-link/llvm-link.cpp5
2 files changed, 7 insertions, 6 deletions
diff --git a/tools/llvm-link/Makefile b/tools/llvm-link/Makefile
index 26370187c5..2553db0cd3 100644
--- a/tools/llvm-link/Makefile
+++ b/tools/llvm-link/Makefile
@@ -6,12 +6,12 @@
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
-LEVEL = ../..
-TOOLNAME = llvm-link
-LINK_COMPONENTS = linker bitreader bitwriter asmparser
+LEVEL := ../..
+TOOLNAME := llvm-link
+LINK_COMPONENTS := linker bitreader bitwriter asmparser
# This tool has no plugins, optimize startup time.
-TOOL_NO_EXPORTS = 1
+TOOL_NO_EXPORTS := 1
include $(LEVEL)/Makefile.common
diff --git a/tools/llvm-link/llvm-link.cpp b/tools/llvm-link/llvm-link.cpp
index 3fb7ba42cd..378a83368f 100644
--- a/tools/llvm-link/llvm-link.cpp
+++ b/tools/llvm-link/llvm-link.cpp
@@ -69,7 +69,7 @@ static inline std::auto_ptr<Module> LoadFile(const char *argv0,
Result = ParseIRFile(FNStr, Err, Context);
if (Result) return std::auto_ptr<Module>(Result); // Load successful!
- Err.Print(argv0, errs());
+ Err.print(argv0, errs());
return std::auto_ptr<Module>();
}
@@ -103,7 +103,8 @@ int main(int argc, char **argv) {
if (Verbose) errs() << "Linking in '" << InputFilenames[i] << "'\n";
- if (Linker::LinkModules(Composite.get(), M.get(), &ErrorMessage)) {
+ if (Linker::LinkModules(Composite.get(), M.get(), Linker::DestroySource,
+ &ErrorMessage)) {
errs() << argv[0] << ": link error in '" << InputFilenames[i]
<< "': " << ErrorMessage << "\n";
return 1;