summaryrefslogtreecommitdiff
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
commit99ccd5d5ef01881b3464b6e6a5b13b9d2c77387e (patch)
tree1bd112ba94e3c839abdda987153297821d4157be
parent87bec915f18d1a68d38c675580aa9c33b596d7cd (diff)
downloadllvm-99ccd5d5ef01881b3464b6e6a5b13b9d2c77387e.tar.gz
llvm-99ccd5d5ef01881b3464b6e6a5b13b9d2c77387e.tar.bz2
llvm-99ccd5d5ef01881b3464b6e6a5b13b9d2c77387e.tar.xz
Reapply r183985 now that the missing check was added to PathV2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184120 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Support/ToolOutputFile.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Support/ToolOutputFile.cpp b/lib/Support/ToolOutputFile.cpp
index af44b43866..824e0a73d2 100644
--- a/lib/Support/ToolOutputFile.cpp
+++ b/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.