[llvm-commits] CVS: llvm/tools/bugpoint/OptimizerDriver.cpp
Chris Lattner
lattner at cs.uiuc.edu
Tue May 11 21:55:01 PDT 2004
Changes in directory llvm/tools/bugpoint:
OptimizerDriver.cpp updated: 1.21 -> 1.22
---
Log message:
Don't leave dead bytecode.output files around if the optimizer/block extractor crashes.
---
Diffs of the changes: (+5 -6)
Index: llvm/tools/bugpoint/OptimizerDriver.cpp
diff -u llvm/tools/bugpoint/OptimizerDriver.cpp:1.21 llvm/tools/bugpoint/OptimizerDriver.cpp:1.22
--- llvm/tools/bugpoint/OptimizerDriver.cpp:1.21 Sun Mar 14 15:37:41 2004
+++ llvm/tools/bugpoint/OptimizerDriver.cpp Tue May 11 21:55:45 2004
@@ -135,13 +135,12 @@
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;
+
+ // 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 (ExitedOK)
More information about the llvm-commits
mailing list