From 3ea11cf8fc4115927514e3b2c7f272a92fd99c89 Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Tue, 17 Nov 2009 10:20:22 +0000 Subject: [PATCH] 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 --- tools/bugpoint/ToolRunner.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/bugpoint/ToolRunner.cpp b/tools/bugpoint/ToolRunner.cpp index 3e63d8050c4..645776eafdb 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 &SharedLibs, unsigned Timeout, unsigned MemoryLimit) { - if (!SharedLibs.empty()) - throw ToolExecutionError("LLI currently does not support " - "loading shared libraries."); - std::vector LLIArgs; LLIArgs.push_back(LLIPath.c_str()); LLIArgs.push_back("-force-interpreter=true"); + for (std::vector::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());