summaryrefslogtreecommitdiff
path: root/include/llvm/Support/FileUtilities.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-01-23 03:11:38 +0000
committerChris Lattner <sabre@nondot.org>2005-01-23 03:11:38 +0000
commitfc54a35956865c01578269ff2f6baf47758b572f (patch)
treeecb5831c669c11b4621a8d669dd0406060773c6c /include/llvm/Support/FileUtilities.h
parent304d0f307627e79dba901615650d422b656146d6 (diff)
downloadllvm-fc54a35956865c01578269ff2f6baf47758b572f.tar.gz
llvm-fc54a35956865c01578269ff2f6baf47758b572f.tar.bz2
llvm-fc54a35956865c01578269ff2f6baf47758b572f.tar.xz
New method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19765 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/FileUtilities.h')
-rw-r--r--include/llvm/Support/FileUtilities.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/llvm/Support/FileUtilities.h b/include/llvm/Support/FileUtilities.h
index 7e5d40500d..86d82a14fd 100644
--- a/include/llvm/Support/FileUtilities.h
+++ b/include/llvm/Support/FileUtilities.h
@@ -28,6 +28,19 @@ namespace llvm {
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.