aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2009-11-17 10:20:22 +0000
committerDuncan Sands <baldrick@free.fr>2009-11-17 10:20:22 +0000
commit3ea11cf8fc4115927514e3b2c7f272a92fd99c89 (patch)
treeba8577b45dbf3f8deab727d0fdcd1c06167bbace
parent9e97f3c2e281b1d5f89da076f37d258e3dec5597 (diff)
Make bugpoint pass -load arguments to LLI. This lets one use bugpoint with
programs that depend on native shared libraries. Patch by Timo Lindfors. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89087 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--tools/bugpoint/ToolRunner.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/bugpoint/ToolRunner.cpp b/tools/bugpoint/ToolRunner.cpp
index 3e63d8050c..645776eafd 100644
--- a/tools/bugpoint/ToolRunner.cpp
+++ b/tools/bugpoint/ToolRunner.cpp
@@ -199,14 +199,15 @@ int LLI::ExecuteProgram(const std::string &Bitcode,
const std::vector<std::string> &SharedLibs,
unsigned Timeout,
unsigned MemoryLimit) {
- if (!SharedLibs.empty())
- throw ToolExecutionError("LLI currently does not support "
- "loading shared libraries.");
-
std::vector<const char*> LLIArgs;
LLIArgs.push_back(LLIPath.c_str());
LLIArgs.push_back("-force-interpreter=true");
+ for (std::vector<std::string>::const_iterator i = SharedLibs.begin(), e = SharedLibs.end(); i != e; ++i) {
+ LLIArgs.push_back("-load");
+ LLIArgs.push_back((*i).c_str());
+ }
+
// Add any extra LLI args.
for (unsigned i = 0, e = ToolArgs.size(); i != e; ++i)
LLIArgs.push_back(ToolArgs[i].c_str());