llvm.org GIT mirror llvm / 5a99874
[FileCheck] Don't scan past the closing CHECK-DAG for CHECK-NOT inside CHECK-DAG If there's enough data in fron of it the skipped region would just become arbitrarily large, and we scan for the CHECK-NOT everywhere. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304900 91177308-0d34-0410-b5e6-96231b3b80d8 Benjamin Kramer 2 years ago
2 changed file(s) with 10 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
1111 add r10, r1, r2
1212 mul r5, r10, r11
1313
14 # begin
15 # end
16 xor
17
1418 ; CHECK-DAG: add [[REG1:r[0-9]+]], r1, r2
1519 ; CHECK-DAG: add [[REG2:r[0-9]+]], r3, r4
1620 ; CHECK: mul r5, [[REG1]], [[REG2]]
2327 ; CHECK-DAG: add [[REG2:r[0-9]+]], r3, r4
2428 ; CHECK-NOT: xor
2529 ; CHECK-DAG: mul r5, [[REG1]], [[REG2]]
30
31 ; CHECK-DAG: begin
32 ; CHECK-NOT: xor
33 ; CHECK-DAG: end
34 ; CHECK: xor
12021202 // If there's CHECK-NOTs between two CHECK-DAGs or from CHECK to
12031203 // CHECK-DAG, verify that there's no 'not' strings occurred in that
12041204 // region.
1205 StringRef SkippedRegion = Buffer.substr(LastPos, MatchPos);
1205 StringRef SkippedRegion = Buffer.slice(LastPos, MatchPos);
12061206 if (CheckNot(SM, SkippedRegion, NotStrings, VariableTable))
12071207 return StringRef::npos;
12081208 // Clear "not strings".