Re-landing "Refactoring cl::list_storage from "is a" to "has a" std::vector."
[oota-llvm.git] / include / llvm / Support / FileUtilities.h
index c6feb9f42689c61a90512f0e8f63deed1c6ee071..2ee2c60b9964b6159d2f26dfc6542d6411099909 100644 (file)
@@ -17,7 +17,6 @@
 
 #include "llvm/Support/FileSystem.h"
 #include "llvm/Support/Path.h"
-#include "llvm/Support/PathV1.h"
 
 namespace llvm {
 
@@ -28,10 +27,10 @@ namespace llvm {
   /// option, it will set the string to an error message if an error occurs, or
   /// if the files are different.
   ///
-  int DiffFilesWithTolerance(const sys::PathWithStatus &FileA,
-                             const sys::PathWithStatus &FileB,
+  int DiffFilesWithTolerance(StringRef FileA,
+                             StringRef FileB,
                              double AbsTol, double RelTol,
-                             std::string *Error = 0);
+                             std::string *Error = nullptr);
 
 
   /// FileRemover - This class is a simple object meant to be stack allocated.
@@ -52,8 +51,7 @@ namespace llvm {
     ~FileRemover() {
       if (DeleteIt) {
         // Ignore problems deleting the file.
-        bool existed;
-        sys::fs::remove(Filename.str(), existed);
+        sys::fs::remove(Filename);
       }
     }
 
@@ -63,8 +61,7 @@ namespace llvm {
     void setFile(const Twine& filename, bool deleteIt = true) {
       if (DeleteIt) {
         // Ignore problems deleting the file.
-        bool existed;
-        sys::fs::remove(Filename.str(), existed);
+        sys::fs::remove(Filename);
       }
 
       Filename.clear();