Fix handling of CHECK-DAG combined with CHECK-NOT

Patch by Daniel Sanders.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187651 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Tim Northover 2013-08-02 11:32:50 +00:00
parent 1cd2ed8fdf
commit e57343b636
2 changed files with 2 additions and 2 deletions

View File

@ -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]]

View File

@ -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();