For PR797:
Make the Win32 code exception free (untested/uncompiled) which forced some
interface changes which had ripple effect. This should be the last of 797.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29884 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/System/Unix/Signals.inc b/lib/System/Unix/Signals.inc
index e464106..35c628b 100644
--- a/lib/System/Unix/Signals.inc
+++ b/lib/System/Unix/Signals.inc
@@ -154,7 +154,7 @@
}
// RemoveFileOnSignal - The public API
-void sys::RemoveFileOnSignal(const sys::Path &Filename) {
+bool sys::RemoveFileOnSignal(const sys::Path &Filename, std::string* ErrMsg) {
if (FilesToRemove == 0)
FilesToRemove = new std::vector<sys::Path>;
@@ -162,14 +162,18 @@
std::for_each(IntSigs, IntSigsEnd, RegisterHandler);
std::for_each(KillSigs, KillSigsEnd, RegisterHandler);
+ return false;
}
// RemoveDirectoryOnSignal - The public API
-void sys::RemoveDirectoryOnSignal(const sys::Path& path) {
+bool sys::RemoveDirectoryOnSignal(const sys::Path& path, std::string* ErrMsg) {
// Not a directory?
sys::FileStatus Status;
- if (path.getFileStatus(Status) || !Status.isDir)
- return;
+ if (path.getFileStatus(Status) || !Status.isDir) {
+ if (ErrMsg)
+ *ErrMsg = path.toString() + " is not a directory";
+ return true;
+ }
if (DirectoriesToRemove == 0)
DirectoriesToRemove = new std::vector<sys::Path>;
@@ -178,6 +182,7 @@
std::for_each(IntSigs, IntSigsEnd, RegisterHandler);
std::for_each(KillSigs, KillSigsEnd, RegisterHandler);
+ return false;
}
/// PrintStackTraceOnErrorSignal - When an error signal (such as SIBABRT or