[mlir][DeclarativeParser][NFC] Use explicit type names in TypeSwitch to
appease older GCC.
Older versions of GCC are unable to properly capture 'this' in template lambdas,
resulting in errors.
diff --git a/mlir/tools/mlir-tblgen/OpFormatGen.cpp b/mlir/tools/mlir-tblgen/OpFormatGen.cpp
index 3655bf7..17c8519 100644
--- a/mlir/tools/mlir-tblgen/OpFormatGen.cpp
+++ b/mlir/tools/mlir-tblgen/OpFormatGen.cpp
@@ -1684,7 +1684,7 @@
})
// Only optional-like(i.e. variadic) operands can be within an optional
// group.
- .Case<OperandVariable>([&](auto *ele) {
+ .Case<OperandVariable>([&](OperandVariable *ele) {
if (!ele->getVar()->isVariadic())
return emitError(childLoc, "only variadic operands can be used within"
" an optional group");
@@ -1694,13 +1694,13 @@
// Literals and type directives may be used, but they can't anchor the
// group.
.Case<LiteralElement, TypeDirective, FunctionalTypeDirective>(
- [&](auto *) {
+ [&](Element *) {
if (isAnchor)
return emitError(childLoc, "only variables can be used to anchor "
"an optional group");
return success();
})
- .Default([&](auto *) {
+ .Default([&](Element *) {
return emitError(childLoc, "only literals, types, and variables can be "
"used within an optional group");
});