diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2009-11-18 14:58:34 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2009-11-18 14:58:34 +0000 |
commit | d2e985fd323c167e20f77b045a1d99ad166e65db (patch) | |
tree | 6a111e552c75afc66228e3d8f19b6731e4013f10 /tools/bugpoint | |
parent | ded64d5d348ce8d8c5aa42cf63f6de9dd84b7e89 (diff) | |
download | FreeBSD-src-d2e985fd323c167e20f77b045a1d99ad166e65db.zip FreeBSD-src-d2e985fd323c167e20f77b045a1d99ad166e65db.tar.gz |
Update LLVM to r89205.
Diffstat (limited to 'tools/bugpoint')
-rw-r--r-- | tools/bugpoint/ToolRunner.cpp | 15 |
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; } } |