aboutsummaryrefslogtreecommitdiff
path: root/mlir/lib/TableGen/Operator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mlir/lib/TableGen/Operator.cpp')
-rw-r--r--mlir/lib/TableGen/Operator.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/mlir/lib/TableGen/Operator.cpp b/mlir/lib/TableGen/Operator.cpp
index da86b00..953d8bc 100644
--- a/mlir/lib/TableGen/Operator.cpp
+++ b/mlir/lib/TableGen/Operator.cpp
@@ -385,7 +385,8 @@ void Operator::populateTypeInferenceInfo(
if (getTrait("::mlir::OpTrait::SameOperandsAndResultType")) {
// Check for a non-variable length operand to use as the type anchor.
auto *operandI = llvm::find_if(arguments, [](const Argument &arg) {
- NamedTypeConstraint *operand = llvm::dyn_cast_if_present<NamedTypeConstraint *>(arg);
+ NamedTypeConstraint *operand =
+ llvm::dyn_cast_if_present<NamedTypeConstraint *>(arg);
return operand && !operand->isVariableLength();
});
if (operandI == arguments.end())
@@ -672,6 +673,8 @@ void Operator::populateOpStructure() {
arguments.emplace_back(&attributes[attrIndex++]);
} else {
assert(argDef->isSubClassOf(propertyClass));
+ attrOrOperandMapping.push_back(
+ {OperandOrAttribute::Kind::Property, propIndex});
arguments.emplace_back(&properties[propIndex++]);
}
}