summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Windows/Signals.inc
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-06-13 21:16:58 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-06-13 21:16:58 +0000
commit4f35da77a6f7da332f9e2f2e0016230df4e78661 (patch)
tree40c899ab1994762caaed92c340531d5a16463401 /llvm/lib/Support/Windows/Signals.inc
parentffcfa52e2adbd736d94fc541c5e0c84e0fdd6aa8 (diff)
downloadbcm5719-llvm-4f35da77a6f7da332f9e2f2e0016230df4e78661.tar.gz
bcm5719-llvm-4f35da77a6f7da332f9e2f2e0016230df4e78661.zip
Don't use PathV1.h in Signals.h.
llvm-svn: 183947
Diffstat (limited to 'llvm/lib/Support/Windows/Signals.inc')
-rw-r--r--llvm/lib/Support/Windows/Signals.inc14
1 files changed, 8 insertions, 6 deletions
diff --git a/llvm/lib/Support/Windows/Signals.inc b/llvm/lib/Support/Windows/Signals.inc
index b18b4d1daca..ec597e91580 100644
--- a/llvm/lib/Support/Windows/Signals.inc
+++ b/llvm/lib/Support/Windows/Signals.inc
@@ -11,6 +11,8 @@
//
//===----------------------------------------------------------------------===//
+#include "llvm/Support/PathV1.h"
+
#include "Windows.h"
#include <algorithm>
#include <stdio.h>
@@ -158,7 +160,7 @@ static BOOL WINAPI LLVMConsoleCtrlHandler(DWORD dwCtrlType);
// InterruptFunction - The function to call if ctrl-c is pressed.
static void (*InterruptFunction)() = 0;
-static std::vector<llvm::sys::Path> *FilesToRemove = NULL;
+static std::vector<std::string> *FilesToRemove = NULL;
static std::vector<std::pair<void(*)(void*), void*> > *CallBacksToRun = 0;
static bool RegisteredUnhandledExceptionFilter = false;
static bool CleanupExecuted = false;
@@ -276,7 +278,7 @@ static void RegisterHandler() {
}
// RemoveFileOnSignal - The public API
-bool sys::RemoveFileOnSignal(const sys::Path &Filename, std::string* ErrMsg) {
+bool sys::RemoveFileOnSignal(StringRef Filename, std::string* ErrMsg) {
RegisterHandler();
if (CleanupExecuted) {
@@ -286,7 +288,7 @@ bool sys::RemoveFileOnSignal(const sys::Path &Filename, std::string* ErrMsg) {
}
if (FilesToRemove == NULL)
- FilesToRemove = new std::vector<sys::Path>;
+ FilesToRemove = new std::vector<std::string>;
FilesToRemove->push_back(Filename);
@@ -295,14 +297,14 @@ bool sys::RemoveFileOnSignal(const sys::Path &Filename, std::string* ErrMsg) {
}
// DontRemoveFileOnSignal - The public API
-void sys::DontRemoveFileOnSignal(const sys::Path &Filename) {
+void sys::DontRemoveFileOnSignal(StringRef Filename) {
if (FilesToRemove == NULL)
return;
RegisterHandler();
FilesToRemove->push_back(Filename);
- std::vector<sys::Path>::reverse_iterator I =
+ std::vector<std::string>::reverse_iterator I =
std::find(FilesToRemove->rbegin(), FilesToRemove->rend(), Filename);
if (I != FilesToRemove->rend())
FilesToRemove->erase(I.base()-1);
@@ -352,7 +354,7 @@ static void Cleanup() {
if (FilesToRemove != NULL)
while (!FilesToRemove->empty()) {
- FilesToRemove->back().eraseFromDisk();
+ sys::Path(FilesToRemove->back()).eraseFromDisk();
FilesToRemove->pop_back();
}
OpenPOWER on IntegriCloud