[llvm-commits] [llvm] r94847 - /llvm/trunk/utils/FileCheck/FileCheck.cpp
Dan Gohman
gohman at apple.com
Fri Jan 29 13:55:16 PST 2010
Author: djg
Date: Fri Jan 29 15:55:16 2010
New Revision: 94847
URL: http://llvm.org/viewvc/llvm-project?rev=94847&view=rev
Log:
Skip whitespace when looking for a potential intended match.
Before:
<stdin>:94:1: note: possible intended match here
movsd 4096(%rsi), %xmm0
^
After:
<stdin>:94:2: note: possible intended match here
movsd 4096(%rsi), %xmm0
^
Modified:
llvm/trunk/utils/FileCheck/FileCheck.cpp
Modified: llvm/trunk/utils/FileCheck/FileCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/FileCheck/FileCheck.cpp?rev=94847&r1=94846&r2=94847&view=diff
==============================================================================
--- llvm/trunk/utils/FileCheck/FileCheck.cpp (original)
+++ llvm/trunk/utils/FileCheck/FileCheck.cpp Fri Jan 29 15:55:16 2010
@@ -382,6 +382,11 @@
if (Buffer[i] == '\n')
++NumLinesForward;
+ // Patterns have leading whitespace stripped, so skip whitespace when
+ // looking for something which looks like a pattern.
+ if (Buffer[i] == ' ' || Buffer[i] == '\t')
+ continue;
+
// Compute the "quality" of this match as an arbitrary combination of the
// match distance and the number of lines skipped to get to this match.
unsigned Distance = ComputeMatchDistance(Buffer.substr(i), VariableTable);
More information about the llvm-commits
mailing list