diff options
| author | Tim Northover <tnorthover@apple.com> | 2013-08-02 11:32:50 +0000 |
|---|---|---|
| committer | Tim Northover <tnorthover@apple.com> | 2013-08-02 11:32:50 +0000 |
| commit | cf708c328422805ed56469f4d4db2edf255669a6 (patch) | |
| tree | 3936c3f19b2cb319b2dd9b2197982d26364d5dbc /llvm | |
| parent | 3dcd7eca7aa23beecfb59e0757e4c56ef8e6f149 (diff) | |
| download | bcm5719-llvm-cf708c328422805ed56469f4d4db2edf255669a6.tar.gz bcm5719-llvm-cf708c328422805ed56469f4d4db2edf255669a6.zip | |
Fix handling of CHECK-DAG combined with CHECK-NOT
Patch by Daniel Sanders.
llvm-svn: 187651
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/test/FileCheck/check-dag.txt | 1 | ||||
| -rw-r--r-- | llvm/utils/FileCheck/FileCheck.cpp | 3 |
2 files changed, 2 insertions, 2 deletions
diff --git a/llvm/test/FileCheck/check-dag.txt b/llvm/test/FileCheck/check-dag.txt index 6325e06e5a0..2b5a47551e8 100644 --- a/llvm/test/FileCheck/check-dag.txt +++ b/llvm/test/FileCheck/check-dag.txt @@ -22,4 +22,5 @@ mul r5, r10, r11 ; CHECK-DAG: add [[REG1:r[0-9]+]], r1, r2 ; CHECK-DAG: add [[REG2:r[0-9]+]], r3, r4 +; CHECK-NOT: xor ; CHECK-DAG: mul r5, [[REG1]], [[REG2]] diff --git a/llvm/utils/FileCheck/FileCheck.cpp b/llvm/utils/FileCheck/FileCheck.cpp index e252db91418..8d5af589092 100644 --- a/llvm/utils/FileCheck/FileCheck.cpp +++ b/llvm/utils/FileCheck/FileCheck.cpp @@ -1013,8 +1013,7 @@ size_t CheckString::CheckDag(const SourceMgr &SM, StringRef Buffer, // CHECK-DAG, verify that there's no 'not' strings occurred in that // region. StringRef SkippedRegion = Buffer.substr(LastPos, MatchPos); - size_t Pos = CheckNot(SM, SkippedRegion, NotStrings, VariableTable); - if (Pos != StringRef::npos) + if (CheckNot(SM, SkippedRegion, NotStrings, VariableTable)) return StringRef::npos; // Clear "not strings". NotStrings.clear(); |

