mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-01 02:33:44 +00:00
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
This commit is contained in:
parent
1e1a99fffa
commit
e4b6a86852
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user