mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
Don't leave dead bytecode.output files around if the optimizer/block extractor crashes.
llvm-svn: 13477
This commit is contained in:
parent
701f4e012f
commit
cf43edc33e
@ -135,14 +135,13 @@ bool BugDriver::runPasses(const std::vector<const PassInfo*> &Passes,
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we are supposed to delete the bytecode file, remove it now
|
|
||||||
// unconditionally... this may fail if the file was never created, but that's
|
|
||||||
// ok.
|
|
||||||
if (DeleteOutput)
|
|
||||||
removeFile(OutputFilename);
|
|
||||||
|
|
||||||
bool ExitedOK = WIFEXITED(Status) && WEXITSTATUS(Status) == 0;
|
bool ExitedOK = WIFEXITED(Status) && WEXITSTATUS(Status) == 0;
|
||||||
|
|
||||||
|
// If we are supposed to delete the bytecode file or if the passes crashed,
|
||||||
|
// remove it now. This may fail if the file was never created, but that's ok.
|
||||||
|
if (DeleteOutput || !ExitedOK)
|
||||||
|
removeFile(OutputFilename);
|
||||||
|
|
||||||
if (!Quiet) {
|
if (!Quiet) {
|
||||||
if (ExitedOK)
|
if (ExitedOK)
|
||||||
std::cout << "Success!\n";
|
std::cout << "Success!\n";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user