<div dir="ltr">Hi Rafael,<div><br></div><div>This broke an internal tester. The eraseFromDisk() method contains some checks for special files to prevent it from removing anything important.</div><div><br></div><div>We really want to keep those checks in place. I'm not familiar with the path library work - what is the best way to resolve this? Should this be reverted, or can the checks be added to sys::fs::remove?</div>
<div><br></div><div>Cheers,</div><div>Lang.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jun 14, 2013 at 9:20 AM, Rafael Espindola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: rafael<br>
Date: Fri Jun 14 11:20:18 2013<br>
New Revision: 183985<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=183985&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=183985&view=rev</a><br>
Log:<br>
Remove a use of PathV1.h.<br>
<br>
Modified:<br>
    llvm/trunk/lib/Support/ToolOutputFile.cpp<br>
<br>
Modified: llvm/trunk/lib/Support/ToolOutputFile.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/ToolOutputFile.cpp?rev=183985&r1=183984&r2=183985&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/ToolOutputFile.cpp?rev=183985&r1=183984&r2=183985&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/Support/ToolOutputFile.cpp (original)<br>
+++ llvm/trunk/lib/Support/ToolOutputFile.cpp Fri Jun 14 11:20:18 2013<br>
@@ -12,7 +12,7 @@<br>
 //===----------------------------------------------------------------------===//<br>
<br>
 #include "llvm/Support/ToolOutputFile.h"<br>
-#include "llvm/Support/PathV1.h"<br>
+#include "llvm/Support/FileSystem.h"<br>
 #include "llvm/Support/Signals.h"<br>
 using namespace llvm;<br>
<br>
@@ -25,8 +25,10 @@ tool_output_file::CleanupInstaller::Clea<br>
<br>
 tool_output_file::CleanupInstaller::~CleanupInstaller() {<br>
   // Delete the file if the client hasn't told us not to.<br>
-  if (!Keep && Filename != "-")<br>
-    sys::Path(Filename).eraseFromDisk();<br>
+  if (!Keep && Filename != "-") {<br>
+    bool Existed;<br>
+    sys::fs::remove(Filename, Existed);<br>
+  }<br>
<br>
   // Ok, the file is successfully written and closed, or deleted. There's no<br>
   // further need to clean it up on signals.<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>