Lines Matching defs:optional

298   std::optional<Attribute> constraint;
424 std::optional<NamedProperty> &getOperandSegmentsSize() {
428 std::optional<NamedProperty> &getResultSegmentsSize() {
453 std::optional<NamedProperty> operandSegmentsSize;
456 std::optional<NamedProperty> resultSegmentsSize;
631 // Generates removers for optional attributes.
926 // Emit a check to see if the iteration has encountered an optional attribute.
946 std::optional<StringRef> constraintFn;
982 // Iterate over the attributes in sorted order. Keep track of the optional
995 for (const AttributeMetadata *optional : optionalAttrs) {
997 getVarName(optional->attrName));
1001 for (const AttributeMetadata *optional : optionalAttrs) {
1003 emitHelper.getAttrName(optional->attrName),
1004 optional->attrName);
1009 // Get trailing optional attributes.
1011 for (const AttributeMetadata *optional : optionalAttrs) {
1013 getVarName(optional->attrName));
1016 for (const AttributeMetadata *optional : optionalAttrs) {
1018 emitHelper.getAttrName(optional->attrName),
1019 optional->attrName);
1390 .addStaticMethod("std::optional<mlir::Attribute>", "getInherentAttr",
1703 std::optional<StringRef> constraintFn =
2015 createMethod("::std::optional<" + baseAttr.getReturnType() + ">");
2021 // If the value isn't optional, just set it directly.
2032 // optional but not in the same way as the others (i.e. it uses bool over
2033 // std::optional<>).
2069 // Generate methods for removing optional attributes, instead of having to
2687 // All done if no attributes, except optional ones, have default values.
2803 std::optional<::mlir::RegisteredOperationName> info =
2924 std::optional<StringRef> paramName = params[i].getName();
2929 if (std::optional<StringRef> defaultParamValue =
2945 std::optional<StringRef> body = builder.getBody();
3046 std::optional<::mlir::RegisteredOperationName> info =
3098 // Track "attr-like" (property and attribute) optional values separate from
3100 // attribute specifically when determining where to trim the optional-value
3127 // TODO: Currently we can't differentiate between optional meaning do not
3128 // verify/not always error if missing or optional meaning need not be
3359 // TODO: The wrapping of optional is different for default or not, so don't
3364 // TODO: UnitAttr is optional, not wrapped, but needs to be guarded as
3727 } else if (std::optional<StringRef> builder =
3837 // Check that an optional value is at most 1 element.
3883 // If the constraint is optional check that the value group has at most 1
4292 genericAdaptorBase.declare<Field>("::std::optional<::mlir::OperationName>",