diff options
Diffstat (limited to 'mlir/lib/Dialect/SPIRV/IR')
-rw-r--r-- | mlir/lib/Dialect/SPIRV/IR/SPIRVAttributes.cpp | 6 | ||||
-rw-r--r-- | mlir/lib/Dialect/SPIRV/IR/SPIRVDialect.cpp | 4 | ||||
-rw-r--r-- | mlir/lib/Dialect/SPIRV/IR/SPIRVOps.cpp | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/mlir/lib/Dialect/SPIRV/IR/SPIRVAttributes.cpp b/mlir/lib/Dialect/SPIRV/IR/SPIRVAttributes.cpp index 90025e97c4e3..add1ebff925e 100644 --- a/mlir/lib/Dialect/SPIRV/IR/SPIRVAttributes.cpp +++ b/mlir/lib/Dialect/SPIRV/IR/SPIRVAttributes.cpp @@ -387,7 +387,7 @@ static Attribute parseInterfaceVarABIAttr(DialectAsmParser &parser) { uint32_t descriptorSet = 0; auto descriptorSetParseResult = parser.parseOptionalInteger(descriptorSet); - if (!descriptorSetParseResult.hasValue() || + if (!descriptorSetParseResult.has_value() || failed(*descriptorSetParseResult)) { parser.emitError(loc, "missing descriptor set"); return {}; @@ -404,7 +404,7 @@ static Attribute parseInterfaceVarABIAttr(DialectAsmParser &parser) { uint32_t binding = 0; auto bindingParseResult = parser.parseOptionalInteger(binding); - if (!bindingParseResult.hasValue() || failed(*bindingParseResult)) { + if (!bindingParseResult.has_value() || failed(*bindingParseResult)) { parser.emitError(loc, "missing binding"); return {}; } @@ -580,7 +580,7 @@ Attribute SPIRVDialect::parseAttribute(DialectAsmParser &parser, Attribute attr; OptionalParseResult result = generatedAttributeParser(parser, &attrKind, type, attr); - if (result.hasValue()) + if (result.has_value()) return attr; if (attrKind == spirv::TargetEnvAttr::getKindName()) diff --git a/mlir/lib/Dialect/SPIRV/IR/SPIRVDialect.cpp b/mlir/lib/Dialect/SPIRV/IR/SPIRVDialect.cpp index 8621281ea017..88bae6bb4326 100644 --- a/mlir/lib/Dialect/SPIRV/IR/SPIRVDialect.cpp +++ b/mlir/lib/Dialect/SPIRV/IR/SPIRVDialect.cpp @@ -573,7 +573,7 @@ static ParseResult parseStructMemberDecorations( SMLoc offsetLoc = parser.getCurrentLocation(); StructType::OffsetInfo offset = 0; OptionalParseResult offsetParseResult = parser.parseOptionalInteger(offset); - if (offsetParseResult.hasValue()) { + if (offsetParseResult.has_value()) { if (failed(*offsetParseResult)) return failure(); @@ -590,7 +590,7 @@ static ParseResult parseStructMemberDecorations( return success(); // If there was an offset, make sure to parse the comma. - if (offsetParseResult.hasValue() && parser.parseComma()) + if (offsetParseResult.has_value() && parser.parseComma()) return failure(); // Check for spirv::Decorations. diff --git a/mlir/lib/Dialect/SPIRV/IR/SPIRVOps.cpp b/mlir/lib/Dialect/SPIRV/IR/SPIRVOps.cpp index dae92ddaf821..5cb451fa46c1 100644 --- a/mlir/lib/Dialect/SPIRV/IR/SPIRVOps.cpp +++ b/mlir/lib/Dialect/SPIRV/IR/SPIRVOps.cpp @@ -2236,7 +2236,7 @@ ParseResult spirv::FuncOp::parse(OpAsmParser &parser, OperationState &state) { // Parse the optional function body. auto *body = state.addRegion(); OptionalParseResult result = parser.parseOptionalRegion(*body, entryArgs); - return failure(result.hasValue() && failed(*result)); + return failure(result.has_value() && failed(*result)); } void spirv::FuncOp::print(OpAsmPrinter &printer) { |