[llvm-commits] CVS: llvm/include/llvm/Support/FileUtilities.h

Chris Lattner lattner at cs.uiuc.edu
Sat Jan 22 19:11:54 PST 2005



Changes in directory llvm/include/llvm/Support:

FileUtilities.h updated: 1.28 -> 1.29
---
Log message:

New method.


---
Diffs of the changes:  (+13 -0)

 FileUtilities.h |   13 +++++++++++++
 1 files changed, 13 insertions(+)


Index: llvm/include/llvm/Support/FileUtilities.h
diff -u llvm/include/llvm/Support/FileUtilities.h:1.28 llvm/include/llvm/Support/FileUtilities.h:1.29
--- llvm/include/llvm/Support/FileUtilities.h:1.28	Thu Jan 20 17:31:35 2005
+++ llvm/include/llvm/Support/FileUtilities.h	Sat Jan 22 21:11:38 2005
@@ -28,6 +28,19 @@
 bool DiffFiles(const std::string &FileA, const std::string &FileB,
                std::string *Error = 0);
 
+/// 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 differs from DiffFiles in that you can specify an absolete 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, allowing the caller to distinguish between a failed diff and a
+/// file system error.
+///
+int DiffFilesWithTolerance(const std::string &FileA, const std::string &FileB,
+                           double AbsTol, double RelTol,
+                           std::string *Error = 0);
+
+
 /// MoveFileOverIfUpdated - If the file specified by New is different than Old,
 /// or if Old does not exist, move the New file over the Old file.  Otherwise,
 /// remove the New file.






More information about the llvm-commits mailing list