diff options
author | Dan Gohman <gohman@apple.com> | 2009-08-05 20:21:17 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-08-05 20:21:17 +0000 |
commit | 46ffffa75013b66089cc2bba311f04141f483bcd (patch) | |
tree | d048aeca3c2e819871525d70765511a00642d449 /llvm/tools/bugpoint/ExecutionDriver.cpp | |
parent | 798ae47b59cb33dd7780ee2d08c86362db60988c (diff) | |
download | bcm5719-llvm-46ffffa75013b66089cc2bba311f04141f483bcd.tar.gz bcm5719-llvm-46ffffa75013b66089cc2bba311f04141f483bcd.zip |
Fix FindExecutable to use sys::Path::GetMainExecutable instead of
just argv[0]. And remove the code for searching the current
working directory and for searching PATH; the point of FindExecutable
is not to find whatever version of the executable can be found by
searching around, but to find an executable that accompanies the
current executable.
Update the tools to use sys::Program::FindProgramByName when they
want PATH searching.
llvm-svn: 78240
Diffstat (limited to 'llvm/tools/bugpoint/ExecutionDriver.cpp')
-rw-r--r-- | llvm/tools/bugpoint/ExecutionDriver.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/llvm/tools/bugpoint/ExecutionDriver.cpp b/llvm/tools/bugpoint/ExecutionDriver.cpp index ceaf8f498bc..3916957a627 100644 --- a/llvm/tools/bugpoint/ExecutionDriver.cpp +++ b/llvm/tools/bugpoint/ExecutionDriver.cpp @@ -177,8 +177,7 @@ bool BugDriver::initializeExecutionEnvironment() { &ToolArgv, &GCCToolArgv); break; case Custom: - Interpreter = AbstractInterpreter::createCustom(getToolName(), Message, - CustomExecCommand); + Interpreter = AbstractInterpreter::createCustom(Message, CustomExecCommand); break; default: Message = "Sorry, this back-end is not supported by bugpoint right now!\n"; @@ -200,7 +199,7 @@ bool BugDriver::initializeExecutionEnvironment() { InterpreterSel == CBE_bug) { SafeInterpreterSel = RunLLC; SafeToolArgs.push_back("--relocation-model=pic"); - SafeInterpreter = AbstractInterpreter::createLLC(Path, Message, + SafeInterpreter = AbstractInterpreter::createLLC(Path.c_str(), Message, &SafeToolArgs, &GCCToolArgv); } @@ -210,7 +209,7 @@ bool BugDriver::initializeExecutionEnvironment() { InterpreterSel == LLC_Safe) { SafeInterpreterSel = RunLLC; SafeToolArgs.push_back("--relocation-model=pic"); - SafeInterpreter = AbstractInterpreter::createLLC(Path, Message, + SafeInterpreter = AbstractInterpreter::createLLC(Path.c_str(), Message, &SafeToolArgs, &GCCToolArgv); } @@ -221,7 +220,7 @@ bool BugDriver::initializeExecutionEnvironment() { if (!SafeInterpreter && InterpreterSel != RunCBE) { SafeInterpreterSel = RunCBE; - SafeInterpreter = AbstractInterpreter::createCBE(Path, Message, + SafeInterpreter = AbstractInterpreter::createCBE(Path.c_str(), Message, &SafeToolArgs, &GCCToolArgv); } @@ -230,7 +229,7 @@ bool BugDriver::initializeExecutionEnvironment() { InterpreterSel != RunJIT) { SafeInterpreterSel = RunLLC; SafeToolArgs.push_back("--relocation-model=pic"); - SafeInterpreter = AbstractInterpreter::createLLC(Path, Message, + SafeInterpreter = AbstractInterpreter::createLLC(Path.c_str(), Message, &SafeToolArgs, &GCCToolArgv); } @@ -241,17 +240,17 @@ bool BugDriver::initializeExecutionEnvironment() { break; case RunLLC: SafeToolArgs.push_back("--relocation-model=pic"); - SafeInterpreter = AbstractInterpreter::createLLC(Path, Message, + SafeInterpreter = AbstractInterpreter::createLLC(Path.c_str(), Message, &SafeToolArgs, &GCCToolArgv); break; case RunCBE: - SafeInterpreter = AbstractInterpreter::createCBE(Path, Message, + SafeInterpreter = AbstractInterpreter::createCBE(Path.c_str(), Message, &SafeToolArgs, &GCCToolArgv); break; case Custom: - SafeInterpreter = AbstractInterpreter::createCustom(Path, Message, + SafeInterpreter = AbstractInterpreter::createCustom(Message, CustomExecCommand); break; default: @@ -261,7 +260,7 @@ bool BugDriver::initializeExecutionEnvironment() { } if (!SafeInterpreter) { outs() << Message << "\nExiting.\n"; exit(1); } - gcc = GCC::create(getToolName(), Message, &GCCToolArgv); + gcc = GCC::create(Message, &GCCToolArgv); if (!gcc) { outs() << Message << "\nExiting.\n"; exit(1); } // If there was an error creating the selected interpreter, quit with error. |