aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-01-20 23:31:35 +0000
committerChris Lattner <sabre@nondot.org>2005-01-20 23:31:35 +0000
commitfb01550ace790b3e1ed66455c85844a39f5735d2 (patch)
tree56193e6158f9221221aedbf95df499a351720e50
parent87a9b716c1945e0770b4b9ea13ddad994c54cda9 (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19723 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/Support/FileUtilities.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/llvm/Support/FileUtilities.h b/include/llvm/Support/FileUtilities.h
index deeb758b02..7e5d40500d 100644
--- a/include/llvm/Support/FileUtilities.h
+++ b/include/llvm/Support/FileUtilities.h
@@ -46,8 +46,10 @@ void MoveFileOverIfUpdated(const std::string &New, const std::string &Old);
: 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