[llvm] r184111 - Revert "Remove a use of PathV1.h."
Rafael Espindola
rafael.espindola at gmail.com
Mon Jun 17 12:54:17 PDT 2013
Author: rafael
Date: Mon Jun 17 14:54:17 2013
New Revision: 184111
URL: http://llvm.org/viewvc/llvm-project?rev=184111&view=rev
Log:
Revert "Remove a use of PathV1.h."
This reverts commit r183985.
We were missing the checks for not deleting things like /dev/null.
Modified:
llvm/trunk/lib/Support/ToolOutputFile.cpp
Modified: llvm/trunk/lib/Support/ToolOutputFile.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/ToolOutputFile.cpp?rev=184111&r1=184110&r2=184111&view=diff
==============================================================================
--- llvm/trunk/lib/Support/ToolOutputFile.cpp (original)
+++ llvm/trunk/lib/Support/ToolOutputFile.cpp Mon Jun 17 14:54:17 2013
@@ -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::Clea
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.
More information about the llvm-commits
mailing list