mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-03 13:31:05 +00:00
Save more temps with -save-temps.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106409 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f0efafa61e
commit
bc2ed599e8
@ -894,6 +894,8 @@ static bool TestCodeGenerator(BugDriver &BD, Module *Test, Module *Safe,
|
|||||||
}
|
}
|
||||||
delete Test;
|
delete Test;
|
||||||
|
|
||||||
|
FileRemover TestModuleBCRemover(TestModuleBC, !SaveTemps);
|
||||||
|
|
||||||
// Make the shared library
|
// Make the shared library
|
||||||
sys::Path SafeModuleBC("bugpoint.safe.bc");
|
sys::Path SafeModuleBC("bugpoint.safe.bc");
|
||||||
if (SafeModuleBC.makeUnique(true, &ErrMsg)) {
|
if (SafeModuleBC.makeUnique(true, &ErrMsg)) {
|
||||||
@ -907,11 +909,16 @@ static bool TestCodeGenerator(BugDriver &BD, Module *Test, Module *Safe,
|
|||||||
<< "'\nExiting.";
|
<< "'\nExiting.";
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FileRemover SafeModuleBCRemover(SafeModuleBC, !SaveTemps);
|
||||||
|
|
||||||
std::string SharedObject = BD.compileSharedObject(SafeModuleBC.str(), Error);
|
std::string SharedObject = BD.compileSharedObject(SafeModuleBC.str(), Error);
|
||||||
if (!Error.empty())
|
if (!Error.empty())
|
||||||
return false;
|
return false;
|
||||||
delete Safe;
|
delete Safe;
|
||||||
|
|
||||||
|
FileRemover SharedObjectRemover(sys::Path(SharedObject), !SaveTemps);
|
||||||
|
|
||||||
// Run the code generator on the `Test' code, loading the shared library.
|
// Run the code generator on the `Test' code, loading the shared library.
|
||||||
// The function returns whether or not the new output differs from reference.
|
// The function returns whether or not the new output differs from reference.
|
||||||
bool Result = BD.diffProgram(TestModuleBC.str(), SharedObject, false, &Error);
|
bool Result = BD.diffProgram(TestModuleBC.str(), SharedObject, false, &Error);
|
||||||
@ -922,9 +929,6 @@ static bool TestCodeGenerator(BugDriver &BD, Module *Test, Module *Safe,
|
|||||||
errs() << ": still failing!\n";
|
errs() << ": still failing!\n";
|
||||||
else
|
else
|
||||||
errs() << ": didn't fail.\n";
|
errs() << ": didn't fail.\n";
|
||||||
TestModuleBC.eraseFromDisk();
|
|
||||||
SafeModuleBC.eraseFromDisk();
|
|
||||||
sys::Path(SharedObject).eraseFromDisk();
|
|
||||||
|
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user