<< InputFilename << "'!\n";
}
} catch (const ParseException &E) {
- std::cerr << "bugpoint: " << E.getMessage() << "\n";
+ std::cerr << "bugpoint: " << E.getMessage() << '\n';
Result = 0;
}
return Result;
std::string ErrorMessage;
if (LinkModules(Program, M.get(), &ErrorMessage)) {
std::cerr << ToolName << ": error linking in '" << Filenames[i] << "': "
- << ErrorMessage << "\n";
+ << ErrorMessage << '\n';
return true;
}
}
std::cout << "Running the code generator to test for a crash: ";
try {
compileProgram(Program);
- std::cout << "\n";
+ std::cout << '\n';
} catch (ToolExecutionError &TEE) {
std::cout << TEE.what();
return debugCodeGeneratorCrash();
try {
ReferenceOutputFile = executeProgramWithCBE("bugpoint.reference.out");
CreatedOutput = true;
- std::cout << "Reference output is: " << ReferenceOutputFile << "\n";
+ std::cout << "Reference output is: " << ReferenceOutputFile << '\n';
} catch (ToolExecutionError &TEE) {
std::cerr << TEE.what();
if (Interpreter != cbe) {
do {
--Simplification;
std::cout << "\n*** Attempting to reduce testcase by deleting instruc"
- << "tions: Simplification Level #" << Simplification << "\n";
+ << "tions: Simplification Level #" << Simplification << '\n';
// Now that we have deleted the functions that are unnecessary for the
// program, try to remove instructions that are not necessary to cause the
std::cout << "\n*** Found crashing pass"
<< (PassesToRun.size() == 1 ? ": " : "es: ")
- << getPassesString(PassesToRun) << "\n";
+ << getPassesString(PassesToRun) << '\n';
EmitProgressBytecode("passinput");
static bool TestForCodeGenCrash(BugDriver &BD, Module *M) {
try {
- std::cerr << "\n";
+ std::cerr << '\n';
BD.compileProgram(M);
+ std::cerr << '\n';
return false;
} catch (ToolExecutionError &TEE) {
std::cerr << "<crash>\n";
cl::opt<bool>
CheckProgramExitCode("check-exit-code",
- cl::desc("Assume nonzero exit code is failure (default on)"),
+ cl::desc("Assume nonzero exit code is failure (default on)"),
cl::init(true));
cl::opt<std::string>
bool FilesDifferent = false;
if (DiffFiles(ReferenceOutputFile, Output, &Error)) {
if (!Error.empty()) {
- std::cerr << "While diffing output: " << Error << "\n";
+ std::cerr << "While diffing output: " << Error << '\n';
exit(1);
}
FilesDifferent = true;
if (!DeleteInputs) M1 = CloneModule(M1);
if (LinkModules(M1, M2, &ErrorMsg)) {
std::cerr << BD.getToolName() << ": Error linking modules together:"
- << ErrorMsg << "\n";
+ << ErrorMsg << '\n';
exit(1);
}
if (DeleteInputs) delete M2; // We are done with this module...
<< " run through the pass"
<< (BD.getPassesToRun().size() == 1 ? "" : "es") << ":";
PrintFunctionList(Funcs);
- std::cout << "\n";
+ std::cout << '\n';
// Split the module into the two halves of the program we want.
Module *ToNotOptimize = CloneModule(BD.getProgram());
std::string ErrorMsg;
if (LinkModules(ToNotOptimize, ToOptimizeLoopExtracted, &ErrorMsg)) {
std::cerr << BD.getToolName() << ": Error linking modules together:"
- << ErrorMsg << "\n";
+ << ErrorMsg << '\n';
exit(1);
}
} else {
std::cout << "blocks are extracted.";
}
- std::cout << "\n";
+ std::cout << '\n';
// Split the module into the two halves of the program we want.
Module *ToNotOptimize = CloneModule(BD.getProgram());
std::string ErrorMsg;
if (LinkModules(ProgClone, Extracted, &ErrorMsg)) {
std::cerr << BD.getToolName() << ": Error linking modules together:"
- << ErrorMsg << "\n";
+ << ErrorMsg << '\n';
exit(1);
}
<< (MiscompiledFunctions.size() == 1 ? " is" : "s are")
<< " being miscompiled: ";
PrintFunctionList(MiscompiledFunctions);
- std::cout << "\n";
+ std::cout << '\n';
// See if we can rip any loops out of the miscompiled functions and still
// trigger the problem.
<< (MiscompiledFunctions.size() == 1 ? " is" : "s are")
<< " being miscompiled: ";
PrintFunctionList(MiscompiledFunctions);
- std::cout << "\n";
+ std::cout << '\n';
}
if (ExtractBlocks(BD, TestFn, MiscompiledFunctions)) {
<< (MiscompiledFunctions.size() == 1 ? " is" : "s are")
<< " being miscompiled: ";
PrintFunctionList(MiscompiledFunctions);
- std::cout << "\n";
+ std::cout << '\n';
}
return MiscompiledFunctions;
std::cout << "\n*** Found miscompiling pass"
<< (getPassesToRun().size() == 1 ? "" : "es") << ": "
- << getPassesString(getPassesToRun()) << "\n";
+ << getPassesString(getPassesToRun()) << '\n';
EmitProgressBytecode("passinput");
std::vector<Function*> MiscompiledFunctions =
}
for (unsigned i=0, e = InputArgv.size(); i != e; ++i)
std::cout << " " << InputArgv[i];
- std::cout << "\n";
+ std::cout << '\n';
std::cout << "The shared object was created with:\n llc -march=c "
<< SafeModuleBC << " -o temporary.c\n"
<< " gcc -xc temporary.c -O2 -o " << SharedObject