[llvm-commits] CVS: llvm/utils/TableGen/TableGen.cpp
Chris Lattner
lattner at cs.uiuc.edu
Fri Aug 1 14:22:01 PDT 2003
Changes in directory llvm/utils/TableGen:
TableGen.cpp updated: 1.13 -> 1.14
---
Log message:
Make sure to delete the output file if there is an error
---
Diffs of the changes:
Index: llvm/utils/TableGen/TableGen.cpp
diff -u llvm/utils/TableGen/TableGen.cpp:1.13 llvm/utils/TableGen/TableGen.cpp:1.14
--- llvm/utils/TableGen/TableGen.cpp:1.13 Fri Aug 1 00:59:20 2003
+++ llvm/utils/TableGen/TableGen.cpp Fri Aug 1 14:21:43 2003
@@ -431,7 +431,10 @@
}
} catch (const std::string &Error) {
std::cerr << Error << "\n";
- if (Out != &std::cout) delete Out;
+ if (Out != &std::cout) {
+ delete Out; // Close the file
+ std::remove(OutputFilename.c_str()); // Remove the file, it's broken
+ }
return 1;
}
More information about the llvm-commits
mailing list