Introduce llvm::sys::path::home_directory.
[oota-llvm.git] / include / llvm / Support / FileUtilities.h
index aab4539088129e01d89f46d15dc8b8c4bc96e8ab..873b8df30e04cd50388c72503e46fd0e193ce818 100644 (file)
@@ -22,13 +22,13 @@ namespace llvm {
 
   /// DiffFilesWithTolerance - Compare the two files specified, returning 0 if
   /// the files match, 1 if they are different, and 2 if there is a file error.
-  /// This function allows you to specify an absolete and relative FP error that
+  /// This function allows you to specify an absolute and relative FP error that
   /// is allowed to exist.  If you specify a string to fill in for the error
   /// 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);
 
@@ -51,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.str());
       }
     }
 
@@ -62,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.str());
       }
 
       Filename.clear();