summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/ToolOutputFile.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-06-17 20:37:56 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-06-17 20:37:56 +0000
commit702a80c72f3edcd37e9ee95b8e0b40ff655980d0 (patch)
tree8b88590192094a83f6450738c891ba211ba3a6d0 /llvm/lib/Support/ToolOutputFile.cpp
parent8cd62b01ef668c61729671dee49a8b165747c40e (diff)
downloadbcm5719-llvm-702a80c72f3edcd37e9ee95b8e0b40ff655980d0.tar.gz
bcm5719-llvm-702a80c72f3edcd37e9ee95b8e0b40ff655980d0.zip
Reapply r183985 now that the missing check was added to PathV2.
llvm-svn: 184120
Diffstat (limited to 'llvm/lib/Support/ToolOutputFile.cpp')
-rw-r--r--llvm/lib/Support/ToolOutputFile.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/lib/Support/ToolOutputFile.cpp b/llvm/lib/Support/ToolOutputFile.cpp
index af44b438666..824e0a73d28 100644
--- a/llvm/lib/Support/ToolOutputFile.cpp
+++ b/llvm/lib/Support/ToolOutputFile.cpp
@@ -12,7 +12,7 @@
//===----------------------------------------------------------------------===//
#include "llvm/Support/ToolOutputFile.h"
-#include "llvm/Support/PathV1.h"
+#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Signals.h"
using namespace llvm;
@@ -25,8 +25,10 @@ tool_output_file::CleanupInstaller::CleanupInstaller(const char *filename)
tool_output_file::CleanupInstaller::~CleanupInstaller() {
// Delete the file if the client hasn't told us not to.
- if (!Keep && Filename != "-")
- sys::Path(Filename).eraseFromDisk();
+ if (!Keep && Filename != "-") {
+ bool Existed;
+ sys::fs::remove(Filename, Existed);
+ }
// Ok, the file is successfully written and closed, or deleted. There's no
// further need to clean it up on signals.
OpenPOWER on IntegriCloud