Suppress warning for unused variable if assertions are disabled.

Reviewed By: bkramer

Differential Revision: https://reviews.llvm.org/D137621
This commit is contained in:
Johannes Reifferscheid
2022-11-08 11:12:09 +01:00
parent b6ec1de7cb
commit eee5c3859e

View File

@@ -2276,6 +2276,7 @@ void PDLByteCode::match(Operation *op, PatternRewriter &rewriter,
uniquedData, matcherByteCode, state.currentPatternBenefits, patterns,
constraintFunctions, rewriteFunctions);
LogicalResult executeResult = executor.execute(rewriter, &matches);
(void)executeResult;
assert(succeeded(executeResult) && "unexpected matcher execution failure");
// Order the found matches by benefit.