Changeset View
Changeset View
Standalone View
Standalone View
mlir/lib/Parser/Parser.cpp
Show First 20 Lines • Show All 1,121 Lines • ▼ Show 20 Lines | if (parseAssembly(*this, opState)) | ||||
return failure(); | return failure(); | ||||
// Verify that the parsed attributes does not have duplicate attributes. | // Verify that the parsed attributes does not have duplicate attributes. | ||||
// This can happen if an attribute set during parsing is also specified in | // This can happen if an attribute set during parsing is also specified in | ||||
// the attribute dictionary in the assembly, or the attribute is set | // the attribute dictionary in the assembly, or the attribute is set | ||||
// multiple during parsing. | // multiple during parsing. | ||||
Optional<NamedAttribute> duplicate = opState.attributes.findDuplicate(); | Optional<NamedAttribute> duplicate = opState.attributes.findDuplicate(); | ||||
if (duplicate) | if (duplicate) | ||||
return emitError(getNameLoc(), "attribute '") | return emitError(getNameLoc(), "attribute '") | ||||
<< duplicate->first | << duplicate->first.getValue() | ||||
<< "' occurs more than once in the attribute list"; | << "' occurs more than once in the attribute list"; | ||||
return success(); | return success(); | ||||
} | } | ||||
Operation *parseGenericOperation(Block *insertBlock, | Operation *parseGenericOperation(Block *insertBlock, | ||||
Block::iterator insertPt) final { | Block::iterator insertPt) final { | ||||
return parser.parseGenericOperation(insertBlock, insertPt); | return parser.parseGenericOperation(insertBlock, insertPt); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 965 Lines • Show Last 20 Lines |