summaryrefslogtreecommitdiffstats
path: root/tools/bugpoint/ToolRunner.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/bugpoint/ToolRunner.cpp')
-rw-r--r--tools/bugpoint/ToolRunner.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/tools/bugpoint/ToolRunner.cpp b/tools/bugpoint/ToolRunner.cpp
index 4551d41..645776e 100644
--- a/tools/bugpoint/ToolRunner.cpp
+++ b/tools/bugpoint/ToolRunner.cpp
@@ -18,7 +18,6 @@
#include "llvm/Support/Debug.h"
#include "llvm/Support/FileUtilities.h"
#include "llvm/Support/raw_ostream.h"
-#include "llvm/ADT/StringExtras.h"
#include "llvm/Config/config.h" // for HAVE_LINK_R
#include <fstream>
#include <sstream>
@@ -200,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());
@@ -610,9 +610,10 @@ IsARMArchitecture(std::vector<std::string> Args)
{
for (std::vector<std::string>::const_iterator
I = Args.begin(), E = Args.end(); I != E; ++I) {
- if (!StringsEqualNoCase(*I, "-arch")) {
+ StringRef S(*I);
+ if (!S.equals_lower("-arch")) {
++I;
- if ((I != E) && !StringsEqualNoCase(I->c_str(), "arm", strlen("arm"))) {
+ if (I != E && !S.substr(0, strlen("arm")).equals_lower("arm")) {
return true;
}
}
OpenPOWER on IntegriCloud