commit | bba62f1882d8e78272f3223c33ed36e4b36d8333 | [log] [tgz] |
---|---|---|
author | Paul Wankadia <junyer@google.com> | Wed Jun 23 08:59:55 2021 -0700 |
committer | Paul Wankadia <junyer@google.com> | Wed Jun 23 16:00:58 2021 +0000 |
tree | 0795d1a75ece7aad3d56619378d17ca857997f0f | |
parent | 87a7f09a47f3bae4c09fdcdd438f5692e01508f8 [diff] |
Fix GetCachedProg() for OnePass. Change-Id: Ifb0ab3842c46e1598cfdf4ccf3f558354f7a3f94 Reviewed-on: https://code-review.googlesource.com/c/re2/+/58672 Reviewed-by: Paul Wankadia <junyer@google.com>
diff --git a/re2/testing/regexp_benchmark.cc b/re2/testing/regexp_benchmark.cc index 5050286..3f86ccc 100644 --- a/re2/testing/regexp_benchmark.cc +++ b/re2/testing/regexp_benchmark.cc
@@ -953,6 +953,8 @@ CHECK(prog); cache[regexp] = prog; re->Decref(); + // We must call this here - while we have exclusive access. + prog->IsOnePass(); } return prog; }