[Support] Fix incorrect assertion in backref compilation
authorNikita Popov <npopov@redhat.com>
Mon, 16 Jan 2023 14:19:22 +0000 (15:19 +0100)
committerNikita Popov <npopov@redhat.com>
Mon, 16 Jan 2023 15:56:33 +0000 (16:56 +0100)
These should be == rather than !=.

llvm/lib/Support/regcomp.c

index 24d0112..9d48419 100644 (file)
@@ -525,8 +525,8 @@ p_ere_exp(struct parse *p)
                        assert(backrefnum <= p->g->nsub);
                        EMIT(OBACK_, backrefnum);
                        assert(p->pbegin[backrefnum] != 0);
-                       assert(OP(p->strip[p->pbegin[backrefnum]]) != OLPAREN);
-                       assert(OP(p->strip[p->pend[backrefnum]]) != ORPAREN);
+                       assert(OP(p->strip[p->pbegin[backrefnum]]) == OLPAREN);
+                       assert(OP(p->strip[p->pend[backrefnum]]) == ORPAREN);
                        (void) dupl(p, p->pbegin[backrefnum]+1, p->pend[backrefnum]);
                        EMIT(O_BACK, backrefnum);
                        p->g->backrefs = 1;