summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/FileUtilities.cpp
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2006-05-15 22:12:42 +0000
committerReid Spencer <rspencer@reidspencer.com>2006-05-15 22:12:42 +0000
commit26bb7c467fd7050ded7c1ffbfa7fec4310a508c7 (patch)
tree7971152b46a3fce26724cefc40855e9e2c4acaea /llvm/lib/Support/FileUtilities.cpp
parent3d01718c70a612ebd16328dedd06b47dd441d0cf (diff)
downloadbcm5719-llvm-26bb7c467fd7050ded7c1ffbfa7fec4310a508c7.tar.gz
bcm5719-llvm-26bb7c467fd7050ded7c1ffbfa7fec4310a508c7.zip
For PR777:
Add an additional catch block to ensure that this function can't throw any exceptions, even one's we're not expecting. llvm-svn: 28309
Diffstat (limited to 'llvm/lib/Support/FileUtilities.cpp')
-rw-r--r--llvm/lib/Support/FileUtilities.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Support/FileUtilities.cpp b/llvm/lib/Support/FileUtilities.cpp
index ae851c7f549..a7f42ddebf8 100644
--- a/llvm/lib/Support/FileUtilities.cpp
+++ b/llvm/lib/Support/FileUtilities.cpp
@@ -241,5 +241,8 @@ int llvm::DiffFilesWithTolerance(const sys::Path &FileA,
} catch (const std::string &Msg) {
if (Error) *Error = Msg;
return 2;
+ } catch (...) {
+ *Error = "Unknown Exception Occurred";
+ return 2;
}
}
OpenPOWER on IntegriCloud