diff options
Diffstat (limited to 'mlir/lib/IR/FunctionSupport.cpp')
| -rw-r--r-- | mlir/lib/IR/FunctionSupport.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/mlir/lib/IR/FunctionSupport.cpp b/mlir/lib/IR/FunctionSupport.cpp index 29cae177cec..6b27eb833bf 100644 --- a/mlir/lib/IR/FunctionSupport.cpp +++ b/mlir/lib/IR/FunctionSupport.cpp @@ -159,12 +159,10 @@ mlir::impl::parseFunctionLikeOp(OpAsmParser &parser, OperationState &result, auto &builder = parser.getBuilder(); // Parse the name as a symbol reference attribute. - FlatSymbolRefAttr nameAttr; - if (parser.parseAttribute(nameAttr, ::mlir::SymbolTable::getSymbolAttrName(), - result.attributes)) + StringAttr nameAttr; + if (parser.parseSymbolName(nameAttr, ::mlir::SymbolTable::getSymbolAttrName(), + result.attributes)) return failure(); - // Convert the parsed function attr into a string attr. - result.attributes.back().second = builder.getStringAttr(nameAttr.getValue()); // Parse the function signature. auto signatureLocation = parser.getCurrentLocation(); |

