[llvm-commits] [llvm] r89087 - /llvm/trunk/tools/bugpoint/ToolRunner.cpp

Duncan Sands baldrick at free.fr
Tue Nov 17 02:20:22 PST 2009


Author: baldrick
Date: Tue Nov 17 04:20:22 2009
New Revision: 89087

URL: http://llvm.org/viewvc/llvm-project?rev=89087&view=rev
Log:
Make bugpoint pass -load arguments to LLI.  This lets one use bugpoint with
programs that depend on native shared libraries.  Patch by Timo Lindfors.

Modified:
    llvm/trunk/tools/bugpoint/ToolRunner.cpp

Modified: llvm/trunk/tools/bugpoint/ToolRunner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/ToolRunner.cpp?rev=89087&r1=89086&r2=89087&view=diff

==============================================================================
--- llvm/trunk/tools/bugpoint/ToolRunner.cpp (original)
+++ llvm/trunk/tools/bugpoint/ToolRunner.cpp Tue Nov 17 04:20:22 2009
@@ -199,14 +199,15 @@
                         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());





More information about the llvm-commits mailing list