summaryrefslogtreecommitdiffstats
path: root/mlir
diff options
context:
space:
mode:
Diffstat (limited to 'mlir')
-rw-r--r--mlir/tools/mlir-tblgen/RewriterGen.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/mlir/tools/mlir-tblgen/RewriterGen.cpp b/mlir/tools/mlir-tblgen/RewriterGen.cpp
index f229a349d27..b2376e8739c 100644
--- a/mlir/tools/mlir-tblgen/RewriterGen.cpp
+++ b/mlir/tools/mlir-tblgen/RewriterGen.cpp
@@ -939,8 +939,7 @@ void PatternEmitter::createAggregateLocalVarsForOpArgs(
"SmallVector<NamedAttribute, 4> tblgen_attrs; (void)tblgen_attrs;\n");
for (int argIndex = 0, e = resultOp.getNumArgs(); argIndex < e; ++argIndex) {
- if (const auto *attr =
- resultOp.getArg(argIndex).dyn_cast<NamedAttribute *>()) {
+ if (resultOp.getArg(argIndex).is<NamedAttribute *>()) {
const char *addAttrCmd = "if ({1}) {{"
" tblgen_attrs.emplace_back(rewriter."
"getIdentifier(\"{0}\"), {1}); }\n";
OpenPOWER on IntegriCloud