[llvm-commits] CVS: llvm/include/llvm/Support/FileUtilities.h
Chris Lattner
lattner at cs.uiuc.edu
Thu Jan 20 15:31:51 PST 2005
Changes in directory llvm/include/llvm/Support:
FileUtilities.h updated: 1.27 -> 1.28
---
Log message:
Apparently destroyFile() now throws an exception. Since this class is
designed to be put on the stack, that's not cool. Catch and ignore the
exception.
---
Diffs of the changes: (+4 -2)
Index: llvm/include/llvm/Support/FileUtilities.h
diff -u llvm/include/llvm/Support/FileUtilities.h:1.27 llvm/include/llvm/Support/FileUtilities.h:1.28
--- llvm/include/llvm/Support/FileUtilities.h:1.27 Wed Dec 22 04:24:43 2004
+++ llvm/include/llvm/Support/FileUtilities.h Thu Jan 20 17:31:35 2005
@@ -46,8 +46,10 @@
: Filename(filename), DeleteIt(deleteIt) {}
~FileRemover() {
- if (DeleteIt)
- Filename.destroyFile();
+ if (DeleteIt)
+ try {
+ Filename.destroyFile();
+ } catch (...) {} // Ignore problems deleting the file.
}
/// releaseFile - Take ownership of the file away from the FileRemover so it
More information about the llvm-commits
mailing list