aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Support/FileUtilities.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Support/FileUtilities.h')
-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