std::string executeProgram(std::string RequestedOutputFilename = "",
std::string Bitcode = "",
const std::string &SharedObjects = "",
- AbstractInterpreter *AI = 0,
- bool *ProgramExitedNonzero = 0);
+ AbstractInterpreter *AI = 0);
/// executeProgramSafely - Used to create reference output with the "safe"
/// backend, if reference output is not provided. If there is a problem with
std::string BugDriver::executeProgram(std::string OutputFile,
std::string BitcodeFile,
const std::string &SharedObj,
- AbstractInterpreter *AI,
- bool *ProgramExitedNonzero) {
+ AbstractInterpreter *AI) {
if (AI == 0) AI = Interpreter;
assert(AI && "Interpreter should have been created already!");
bool CreatedBitcode = false;
}
// Remove the temporary bitcode file when we are done.
- sys::Path BitcodePath (BitcodeFile);
+ sys::Path BitcodePath(BitcodeFile);
FileRemover BitcodeFileRemover(BitcodePath, CreatedBitcode && !SaveTemps);
if (OutputFile.empty()) OutputFile = OutputPrefix + "-execution-output";
outFile.close();
}
- if (ProgramExitedNonzero != 0)
- *ProgramExitedNonzero = (RetVal != 0);
-
// Return the filename we captured the output to.
return OutputFile;
}
/// backend, if reference output is not provided.
///
std::string BugDriver::executeProgramSafely(std::string OutputFile) {
- bool ProgramExitedNonzero;
- std::string outFN = executeProgram(OutputFile, "", "", SafeInterpreter,
- &ProgramExitedNonzero);
+ std::string outFN = executeProgram(OutputFile, "", "", SafeInterpreter);
return outFN;
}
bool BugDriver::diffProgram(const std::string &BitcodeFile,
const std::string &SharedObject,
bool RemoveBitcode) {
- bool ProgramExitedNonzero;
-
// Execute the program, generating an output file...
- sys::Path Output(executeProgram("", BitcodeFile, SharedObject, 0,
- &ProgramExitedNonzero));
+ sys::Path Output(executeProgram("", BitcodeFile, SharedObject, 0));
std::string Error;
bool FilesDifferent = false;