mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 04:30:23 +00:00
Apply "Win32's Hybrid path separator in argv[0] should be accepted to bugpoint",
patch by NAKAMURA Takumi! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111929 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2f6e0e68a4
commit
a69e6701a4
@ -27,6 +27,7 @@
|
||||
#include "llvm/Target/TargetData.h"
|
||||
#include "llvm/Support/FileUtilities.h"
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
#include "llvm/Support/SystemUtils.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
#include "llvm/System/Path.h"
|
||||
@ -150,16 +151,8 @@ bool BugDriver::runPasses(Module *Program,
|
||||
|
||||
// setup the child process' arguments
|
||||
SmallVector<const char*, 8> Args;
|
||||
std::string Opt;
|
||||
llvm::StringRef TN(ToolName);
|
||||
if (TN.find('/') == llvm::StringRef::npos) {
|
||||
Opt = "opt";
|
||||
} else {
|
||||
std::pair<llvm::StringRef, llvm::StringRef> P = TN.rsplit('/');
|
||||
Opt = P.first.str() + "/" + "opt";
|
||||
}
|
||||
|
||||
sys::Path tool = sys::Program::FindProgramByName(Opt);
|
||||
sys::Path tool = FindExecutable("opt", getToolName(), (void*)"opt");
|
||||
std::string Opt = tool.str();
|
||||
if (UseValgrind) {
|
||||
Args.push_back("valgrind");
|
||||
Args.push_back("--error-exitcode=1");
|
||||
|
Loading…
Reference in New Issue
Block a user