summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/ToolOutputFile.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-06-17 19:54:17 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-06-17 19:54:17 +0000
commit7648aa3558b207746f5ee9a8c745c6d20850b41f (patch)
tree79de64f8672cf222f7bc0aea48d6e393caeb840d /llvm/lib/Support/ToolOutputFile.cpp
parent9bb34d66b337fdb575d751ce289078323a9bd0c7 (diff)
downloadbcm5719-llvm-7648aa3558b207746f5ee9a8c745c6d20850b41f.tar.gz
bcm5719-llvm-7648aa3558b207746f5ee9a8c745c6d20850b41f.zip
Revert "Remove a use of PathV1.h."
This reverts commit r183985. We were missing the checks for not deleting things like /dev/null. llvm-svn: 184111
Diffstat (limited to 'llvm/lib/Support/ToolOutputFile.cpp')
-rw-r--r--llvm/lib/Support/ToolOutputFile.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/llvm/lib/Support/ToolOutputFile.cpp b/llvm/lib/Support/ToolOutputFile.cpp
index 824e0a73d28..af44b438666 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/FileSystem.h"
+#include "llvm/Support/PathV1.h"
#include "llvm/Support/Signals.h"
using namespace llvm;
@@ -25,10 +25,8 @@ 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 != "-") {
- bool Existed;
- sys::fs::remove(Filename, Existed);
- }
+ if (!Keep && Filename != "-")
+ sys::Path(Filename).eraseFromDisk();
// Ok, the file is successfully written and closed, or deleted. There's no
// further need to clean it up on signals.
OpenPOWER on IntegriCloud