[llvm-commits] CVS: llvm/tools/bugpoint/ExecutionDriver.cpp
Brian Gaeke
gaeke at cs.uiuc.edu
Tue May 4 16:09:13 PDT 2004
Changes in directory llvm/tools/bugpoint:
ExecutionDriver.cpp updated: 1.40 -> 1.41
---
Log message:
Add --tool-args flag which lets you pass arguments to llc or lli.
This is intended to address Bug 40: http://llvm.cs.uiuc.edu/PR40 .
---
Diffs of the changes: (+22 -9)
Index: llvm/tools/bugpoint/ExecutionDriver.cpp
diff -u llvm/tools/bugpoint/ExecutionDriver.cpp:1.40 llvm/tools/bugpoint/ExecutionDriver.cpp:1.41
--- llvm/tools/bugpoint/ExecutionDriver.cpp:1.40 Sun Apr 18 22:12:35 2004
+++ llvm/tools/bugpoint/ExecutionDriver.cpp Tue May 4 16:09:16 2004
@@ -71,6 +71,10 @@
cl::list<std::string>
InputArgv("args", cl::Positional, cl::desc("<program arguments>..."),
cl::ZeroOrMore);
+
+ cl::list<std::string>
+ ToolArgv("tool-args", cl::Positional, cl::desc("<tool arguments>..."),
+ cl::ZeroOrMore);
}
//===----------------------------------------------------------------------===//
@@ -87,21 +91,26 @@
// the command line
cbe = 0;
std::string Message;
+
switch (InterpreterSel) {
case AutoPick:
InterpreterSel = RunCBE;
- Interpreter = cbe = AbstractInterpreter::createCBE(getToolName(), Message);
+ Interpreter = cbe = AbstractInterpreter::createCBE(getToolName(), Message,
+ &ToolArgv);
if (!Interpreter) {
InterpreterSel = RunJIT;
- Interpreter = AbstractInterpreter::createJIT(getToolName(), Message);
+ Interpreter = AbstractInterpreter::createJIT(getToolName(), Message,
+ &ToolArgv);
}
if (!Interpreter) {
InterpreterSel = RunLLC;
- Interpreter = AbstractInterpreter::createLLC(getToolName(), Message);
+ Interpreter = AbstractInterpreter::createLLC(getToolName(), Message,
+ &ToolArgv);
}
if (!Interpreter) {
InterpreterSel = RunLLI;
- Interpreter = AbstractInterpreter::createLLI(getToolName(), Message);
+ Interpreter = AbstractInterpreter::createLLI(getToolName(), Message,
+ &ToolArgv);
}
if (!Interpreter) {
InterpreterSel = AutoPick;
@@ -109,16 +118,20 @@
}
break;
case RunLLI:
- Interpreter = AbstractInterpreter::createLLI(getToolName(), Message);
+ Interpreter = AbstractInterpreter::createLLI(getToolName(), Message,
+ &ToolArgv);
break;
case RunLLC:
- Interpreter = AbstractInterpreter::createLLC(getToolName(), Message);
+ Interpreter = AbstractInterpreter::createLLC(getToolName(), Message,
+ &ToolArgv);
break;
case RunJIT:
- Interpreter = AbstractInterpreter::createJIT(getToolName(), Message);
+ Interpreter = AbstractInterpreter::createJIT(getToolName(), Message,
+ &ToolArgv);
break;
case RunCBE:
- Interpreter = cbe = AbstractInterpreter::createCBE(getToolName(), Message);
+ Interpreter = cbe = AbstractInterpreter::createCBE(getToolName(), Message,
+ &ToolArgv);
break;
default:
Message = "Sorry, this back-end is not supported by bugpoint right now!\n";
@@ -128,7 +141,7 @@
// Initialize auxiliary tools for debugging
if (!cbe) {
- cbe = AbstractInterpreter::createCBE(getToolName(), Message);
+ cbe = AbstractInterpreter::createCBE(getToolName(), Message, &ToolArgv);
if (!cbe) { std::cout << Message << "\nExiting.\n"; exit(1); }
}
gcc = GCC::create(getToolName(), Message);
More information about the llvm-commits
mailing list