[llvm-commits] CVS: llvm/lib/System/Win32/Signals.cpp
Reid Spencer
reid at x10sys.com
Tue Sep 28 16:58:13 PDT 2004
Changes in directory llvm/lib/System/Win32:
Signals.cpp updated: 1.5 -> 1.6
---
Log message:
Use llvm::sys::Path to destroy the file.
Patch contributed by Jeff Cohen. Thanks Jeff!
---
Diffs of the changes: (+5 -4)
Index: llvm/lib/System/Win32/Signals.cpp
diff -u llvm/lib/System/Win32/Signals.cpp:1.5 llvm/lib/System/Win32/Signals.cpp:1.6
--- llvm/lib/System/Win32/Signals.cpp:1.5 Thu Sep 23 09:47:10 2004
+++ llvm/lib/System/Win32/Signals.cpp Tue Sep 28 18:58:03 2004
@@ -13,6 +13,7 @@
#include "Win32.h"
#include <llvm/System/Signals.h>
+#include <stdio.h>
#include <vector>
#ifdef __MINGW_H
@@ -29,7 +30,7 @@
static LONG WINAPI LLVMUnhandledExceptionFilter(LPEXCEPTION_POINTERS ep);
static BOOL WINAPI LLVMConsoleCtrlHandler(DWORD dwCtrlType);
-static std::vector<std::string> *FilesToRemove = NULL;
+static std::vector<llvm::sys::Path> *FilesToRemove = NULL;
static std::vector<llvm::sys::Path> *DirectoriesToRemove = NULL;
static bool RegisteredUnhandledExceptionFilter = false;
static bool CleanupExecuted = false;
@@ -78,9 +79,9 @@
throw std::string("Process terminating -- cannot register for removal");
if (FilesToRemove == NULL)
- FilesToRemove = new std::vector<std::string>;
+ FilesToRemove = new std::vector<sys::Path>;
- FilesToRemove->push_back(Filename);
+ FilesToRemove->push_back(sys::Path(Filename));
LeaveCriticalSection(&CriticalSection);
}
@@ -123,7 +124,7 @@
if (FilesToRemove != NULL)
while (!FilesToRemove->empty()) {
try {
- std::remove(FilesToRemove->back().c_str());
+ FilesToRemove->back().destroy_file();
} catch (...) {
}
FilesToRemove->pop_back();
More information about the llvm-commits
mailing list