From f1f1a4f16128ffa2910f0b1d5c7052b3697f9fcd Mon Sep 17 00:00:00 2001 From: Tanya Lattner Date: Tue, 11 Oct 2011 00:24:54 +0000 Subject: Make it possible to use the linker without destroying the source module. This is so the source module can be linked to multiple other destination modules. For all that used LinkModules() before, they will continue to destroy the source module as before. This line, and those below, will be ignored-- M include/llvm/Linker.h M tools/bugpoint/Miscompilation.cpp M tools/bugpoint/BugDriver.cpp M tools/llvm-link/llvm-link.cpp M lib/Linker/LinkModules.cpp git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141606 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/llvm-link/llvm-link.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tools/llvm-link') diff --git a/tools/llvm-link/llvm-link.cpp b/tools/llvm-link/llvm-link.cpp index 3fb7ba4..95ad1ca 100644 --- a/tools/llvm-link/llvm-link.cpp +++ b/tools/llvm-link/llvm-link.cpp @@ -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; -- cgit v1.1 From d8b7aa26134d2abee777f745c32005e63dea2455 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 16 Oct 2011 04:47:35 +0000 Subject: Enhance llvm::SourceMgr to support diagnostic ranges, the same way clang does. Enhance the X86 asmparser to produce ranges in the one case that was annoying me, for example: test.s:10:15: error: invalid operand for instruction movl 0(%rax), 0(%edx) ^~~~~~~ It should be straight-forward to enhance filecheck, tblgen, and/or the .ll parser to use ranges where appropriate if someone is interested. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142106 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/llvm-link/llvm-link.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/llvm-link') diff --git a/tools/llvm-link/llvm-link.cpp b/tools/llvm-link/llvm-link.cpp index 95ad1ca..378a833 100644 --- a/tools/llvm-link/llvm-link.cpp +++ b/tools/llvm-link/llvm-link.cpp @@ -69,7 +69,7 @@ static inline std::auto_ptr LoadFile(const char *argv0, Result = ParseIRFile(FNStr, Err, Context); if (Result) return std::auto_ptr(Result); // Load successful! - Err.Print(argv0, errs()); + Err.print(argv0, errs()); return std::auto_ptr(); } -- cgit v1.1 From 8c39c9647da4f375e4f89bd417d86f5c3ff6dfa5 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Tue, 18 Oct 2011 19:27:24 +0000 Subject: build: Tidy up a bunch of tool Makefiles, and simplify where possible using the new all-targets pseudo-component. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142401 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/llvm-link/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tools/llvm-link') diff --git a/tools/llvm-link/Makefile b/tools/llvm-link/Makefile index 2637018..2553db0 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 -- cgit v1.1