summaryrefslogtreecommitdiff
path: root/lib/Support/FileUtilities.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-02-15 22:01:43 +0000
committerChris Lattner <sabre@nondot.org>2005-02-15 22:01:43 +0000
commite4b6a86852966fa217630d09e5b61df25b43fda0 (patch)
tree455d62bba15d5986ad46b2897618b60f9aa95de5 /lib/Support/FileUtilities.cpp
parent1e1a99fffac551af96df11a9149f40e17f68af42 (diff)
downloadllvm-e4b6a86852966fa217630d09e5b61df25b43fda0.tar.gz
llvm-e4b6a86852966fa217630d09e5b61df25b43fda0.tar.bz2
llvm-e4b6a86852966fa217630d09e5b61df25b43fda0.tar.xz
Make this more efficient now that we know both files are the same length.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20202 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/FileUtilities.cpp')
-rw-r--r--lib/Support/FileUtilities.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Support/FileUtilities.cpp b/lib/Support/FileUtilities.cpp
index 0a55bc8312..6ac9bc91bc 100644
--- a/lib/Support/FileUtilities.cpp
+++ b/lib/Support/FileUtilities.cpp
@@ -148,11 +148,11 @@ int llvm::DiffFilesWithTolerance(const sys::Path &FileA,
if (A_size == B_size) {
// Scan for the end of file or first difference.
- while (F1P < File1End && F2P < File2End && *F1P == *F2P)
+ while (F1P < File1End && *F1P == *F2P)
++F1P, ++F2P;
// Common case: identifical files.
- if (F1P == File1End && F2P == File2End)
+ if (F1P == File1End)
return 0; // Scanned to end, files same
if (AbsTol == 0 && RelTol == 0)