mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-25 00:24:26 +00:00
Remove stupid thinko that was preventing bugpoint from working
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6533 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -39,16 +39,15 @@ DebugCrashes::TestResult
|
|||||||
DebugCrashes::doTest(std::vector<const PassInfo*> &Prefix,
|
DebugCrashes::doTest(std::vector<const PassInfo*> &Prefix,
|
||||||
std::vector<const PassInfo*> &Suffix) {
|
std::vector<const PassInfo*> &Suffix) {
|
||||||
std::string PrefixOutput;
|
std::string PrefixOutput;
|
||||||
|
Module *OrigProgram = 0;
|
||||||
if (!Prefix.empty()) {
|
if (!Prefix.empty()) {
|
||||||
std::cout << "Checking to see if these passes crash: "
|
std::cout << "Checking to see if these passes crash: "
|
||||||
<< getPassesString(Prefix) << ": ";
|
<< getPassesString(Prefix) << ": ";
|
||||||
if (BD.runPasses(Prefix, PrefixOutput))
|
if (BD.runPasses(Prefix, PrefixOutput))
|
||||||
return KeepPrefix;
|
return KeepPrefix;
|
||||||
}
|
|
||||||
|
|
||||||
std::cout << "Checking to see if these passes crash: "
|
OrigProgram = BD.Program;
|
||||||
<< getPassesString(Suffix) << ": ";
|
|
||||||
Module *OrigProgram = BD.Program;
|
|
||||||
BD.Program = BD.ParseInputFile(PrefixOutput);
|
BD.Program = BD.ParseInputFile(PrefixOutput);
|
||||||
if (BD.Program == 0) {
|
if (BD.Program == 0) {
|
||||||
std::cerr << BD.getToolName() << ": Error reading bytecode file '"
|
std::cerr << BD.getToolName() << ": Error reading bytecode file '"
|
||||||
@ -56,6 +55,10 @@ DebugCrashes::doTest(std::vector<const PassInfo*> &Prefix,
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
removeFile(PrefixOutput);
|
removeFile(PrefixOutput);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::cout << "Checking to see if these passes crash: "
|
||||||
|
<< getPassesString(Suffix) << ": ";
|
||||||
|
|
||||||
if (BD.runPasses(Suffix)) {
|
if (BD.runPasses(Suffix)) {
|
||||||
delete OrigProgram; // The suffix crashes alone...
|
delete OrigProgram; // The suffix crashes alone...
|
||||||
@ -63,8 +66,10 @@ DebugCrashes::doTest(std::vector<const PassInfo*> &Prefix,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Nothing failed, restore state...
|
// Nothing failed, restore state...
|
||||||
|
if (OrigProgram) {
|
||||||
delete BD.Program;
|
delete BD.Program;
|
||||||
BD.Program = OrigProgram;
|
BD.Program = OrigProgram;
|
||||||
|
}
|
||||||
return NoFailure;
|
return NoFailure;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user