diff options
author | Tanya Lattner <tonic@nondot.org> | 2011-10-11 00:24:54 +0000 |
---|---|---|
committer | Tanya Lattner <tonic@nondot.org> | 2011-10-11 00:24:54 +0000 |
commit | cbb9140806664d99d2f2b1b18de3907d2eb1debf (patch) | |
tree | 0097b4d698cc7cebb9783165c4502302b5fc793d /llvm/tools/bugpoint/BugDriver.cpp | |
parent | fdbb7c51e94309b74a70148e39d3719dbfb5f6c6 (diff) | |
download | bcm5719-llvm-cbb9140806664d99d2f2b1b18de3907d2eb1debf.tar.gz bcm5719-llvm-cbb9140806664d99d2f2b1b18de3907d2eb1debf.zip |
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
llvm-svn: 141606
Diffstat (limited to 'llvm/tools/bugpoint/BugDriver.cpp')
-rw-r--r-- | llvm/tools/bugpoint/BugDriver.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/tools/bugpoint/BugDriver.cpp b/llvm/tools/bugpoint/BugDriver.cpp index aa3e2906364..677d17887f4 100644 --- a/llvm/tools/bugpoint/BugDriver.cpp +++ b/llvm/tools/bugpoint/BugDriver.cpp @@ -127,7 +127,8 @@ bool BugDriver::addSources(const std::vector<std::string> &Filenames) { outs() << "Linking in input file: '" << Filenames[i] << "'\n"; std::string ErrorMessage; - if (Linker::LinkModules(Program, M.get(), &ErrorMessage)) { + if (Linker::LinkModules(Program, M.get(), Linker::DestroySource, + &ErrorMessage)) { errs() << ToolName << ": error linking in '" << Filenames[i] << "': " << ErrorMessage << '\n'; return true; |