From eee5c3859e78488246126a568a94f697c4f924ba Mon Sep 17 00:00:00 2001 From: Johannes Reifferscheid Date: Tue, 8 Nov 2022 11:12:09 +0100 Subject: [PATCH] Suppress warning for unused variable if assertions are disabled. Reviewed By: bkramer Differential Revision: https://reviews.llvm.org/D137621 --- mlir/lib/Rewrite/ByteCode.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/mlir/lib/Rewrite/ByteCode.cpp b/mlir/lib/Rewrite/ByteCode.cpp index 6b1dfb9..b4a57f3 100644 --- a/mlir/lib/Rewrite/ByteCode.cpp +++ b/mlir/lib/Rewrite/ByteCode.cpp @@ -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. -- 2.7.4