summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit9d0db6f60293b0fba9a8e84f1d80f6093d2f7413 (patch)
treecd2156b68feb9172efbdb10a2d05db4f92b48ba3 /llvm/lib/Support/FileUtilities.cpp
parentf232a4582da630df7f8c850775c1310bc3e5b766 (diff)
downloadbcm5719-llvm-9d0db6f60293b0fba9a8e84f1d80f6093d2f7413.tar.gz
bcm5719-llvm-9d0db6f60293b0fba9a8e84f1d80f6093d2f7413.zip
Make this more efficient now that we know both files are the same length.
llvm-svn: 20202
Diffstat (limited to 'llvm/lib/Support/FileUtilities.cpp')
-rw-r--r--llvm/lib/Support/FileUtilities.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Support/FileUtilities.cpp b/llvm/lib/Support/FileUtilities.cpp
index 0a55bc83124..6ac9bc91bc3 100644
--- a/llvm/lib/Support/FileUtilities.cpp
+++ b/llvm/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)
OpenPOWER on IntegriCloud