Update comments, if we are running with the CBE, make sure the Interpreter
variable and the CBE variable are pointer equal. llvm-svn: 11599
This commit is contained in:
parent
3c10196aab
commit
898de4a158
|
@ -173,7 +173,8 @@ private:
|
||||||
|
|
||||||
/// executeProgram - This method runs "Program", capturing the output of the
|
/// executeProgram - This method runs "Program", capturing the output of the
|
||||||
/// program to a file, returning the filename of the file. A recommended
|
/// program to a file, returning the filename of the file. A recommended
|
||||||
/// filename may be optionally specified.
|
/// filename may be optionally specified. If there is a problem with the code
|
||||||
|
/// generator (e.g., llc crashes), this will throw an exception.
|
||||||
///
|
///
|
||||||
std::string executeProgram(std::string RequestedOutputFilename = "",
|
std::string executeProgram(std::string RequestedOutputFilename = "",
|
||||||
std::string Bytecode = "",
|
std::string Bytecode = "",
|
||||||
|
@ -182,13 +183,15 @@ private:
|
||||||
bool *ProgramExitedNonzero = 0);
|
bool *ProgramExitedNonzero = 0);
|
||||||
|
|
||||||
/// executeProgramWithCBE - Used to create reference output with the C
|
/// executeProgramWithCBE - Used to create reference output with the C
|
||||||
/// backend, if reference output is not provided.
|
/// backend, if reference output is not provided. If there is a problem with
|
||||||
|
/// the code generator (e.g., llc crashes), this will throw an exception.
|
||||||
///
|
///
|
||||||
std::string executeProgramWithCBE(std::string OutputFile = "");
|
std::string executeProgramWithCBE(std::string OutputFile = "");
|
||||||
|
|
||||||
/// diffProgram - This method executes the specified module and diffs the
|
/// diffProgram - This method executes the specified module and diffs the
|
||||||
/// output against the file specified by ReferenceOutputFile. If the output
|
/// output against the file specified by ReferenceOutputFile. If the output
|
||||||
/// is different, true is returned.
|
/// is different, true is returned. If there is a problem with the code
|
||||||
|
/// generator (e.g., llc crashes), this will throw an exception.
|
||||||
///
|
///
|
||||||
bool diffProgram(const std::string &BytecodeFile = "",
|
bool diffProgram(const std::string &BytecodeFile = "",
|
||||||
const std::string &SharedObj = "",
|
const std::string &SharedObj = "",
|
||||||
|
|
|
@ -84,11 +84,12 @@ bool BugDriver::initializeExecutionEnvironment() {
|
||||||
|
|
||||||
// Create an instance of the AbstractInterpreter interface as specified on
|
// Create an instance of the AbstractInterpreter interface as specified on
|
||||||
// the command line
|
// the command line
|
||||||
|
cbe = 0;
|
||||||
std::string Message;
|
std::string Message;
|
||||||
switch (InterpreterSel) {
|
switch (InterpreterSel) {
|
||||||
case AutoPick:
|
case AutoPick:
|
||||||
InterpreterSel = RunCBE;
|
InterpreterSel = RunCBE;
|
||||||
Interpreter = AbstractInterpreter::createCBE(getToolName(), Message);
|
Interpreter = cbe = AbstractInterpreter::createCBE(getToolName(), Message);
|
||||||
if (!Interpreter) {
|
if (!Interpreter) {
|
||||||
InterpreterSel = RunJIT;
|
InterpreterSel = RunJIT;
|
||||||
Interpreter = AbstractInterpreter::createJIT(getToolName(), Message);
|
Interpreter = AbstractInterpreter::createJIT(getToolName(), Message);
|
||||||
|
@ -116,7 +117,7 @@ bool BugDriver::initializeExecutionEnvironment() {
|
||||||
Interpreter = AbstractInterpreter::createJIT(getToolName(), Message);
|
Interpreter = AbstractInterpreter::createJIT(getToolName(), Message);
|
||||||
break;
|
break;
|
||||||
case RunCBE:
|
case RunCBE:
|
||||||
Interpreter = AbstractInterpreter::createCBE(getToolName(), Message);
|
Interpreter = cbe = AbstractInterpreter::createCBE(getToolName(), Message);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Message = "Sorry, this back-end is not supported by bugpoint right now!\n";
|
Message = "Sorry, this back-end is not supported by bugpoint right now!\n";
|
||||||
|
@ -125,8 +126,10 @@ bool BugDriver::initializeExecutionEnvironment() {
|
||||||
std::cerr << Message;
|
std::cerr << Message;
|
||||||
|
|
||||||
// Initialize auxiliary tools for debugging
|
// Initialize auxiliary tools for debugging
|
||||||
|
if (!cbe) {
|
||||||
cbe = AbstractInterpreter::createCBE(getToolName(), Message);
|
cbe = AbstractInterpreter::createCBE(getToolName(), Message);
|
||||||
if (!cbe) { std::cout << Message << "\nExiting.\n"; exit(1); }
|
if (!cbe) { std::cout << Message << "\nExiting.\n"; exit(1); }
|
||||||
|
}
|
||||||
gcc = GCC::create(getToolName(), Message);
|
gcc = GCC::create(getToolName(), Message);
|
||||||
if (!gcc) { std::cout << Message << "\nExiting.\n"; exit(1); }
|
if (!gcc) { std::cout << Message << "\nExiting.\n"; exit(1); }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue