fix a FileCheck bug where:
authorChris Lattner <sabre@nondot.org>
Mon, 21 Sep 2009 02:30:42 +0000 (02:30 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 21 Sep 2009 02:30:42 +0000 (02:30 +0000)
; CHECK: foo
; CHECK-NOT: foo
; CHECK: bar

would always fail.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82424 91177308-0d34-0410-b5e6-96231b3b80d8

test/Transforms/GVN/rle.ll
utils/FileCheck/FileCheck.cpp

index 98e99b07d4868477a0fcb2a69550cdd013312a05..503a5bbacd11fb67fc93664a3f9e6d0fdbcf500c 100644 (file)
@@ -73,7 +73,6 @@ F:
 
 ; CHECK: @coerce_mustalias4
 ; CHECK: %A = load i32* %P
-; CHECK: bitcast
 ; CHECK-NOT: load
 ; CHECK: ret float
 ; CHECK: F:
index 8f48c3a0cf309131efbd99be7d76b77a9c5a07de..a6c1f74f6d6cfe5b650601a8a20b5732f402d422 100644 (file)
@@ -361,10 +361,10 @@ int main(int argc, char **argv) {
     }
     
 
-    // Otherwise, everything is good.  Remember this as the last match and move
-    // on to the next one.
-    LastMatch = Buffer.data();
+    // Otherwise, everything is good.  Step over the matched text and remember
+    // the position after the match as the end of the last match.
     Buffer = Buffer.substr(CheckStr.Str.size());
+    LastMatch = Buffer.data();
   }
   
   return 0;