summaryrefslogtreecommitdiffstats
path: root/mlir/lib/IR/Module.cpp
diff options
context:
space:
mode:
authorRiver Riddle <riverriddle@google.com>2019-11-13 09:31:45 -0800
committerA. Unique TensorFlower <gardener@tensorflow.org>2019-11-13 09:32:20 -0800
commit6df83699418c6a6d6105728cdec59c78212aa841 (patch)
tree7368b187b45efb25e89423a4c8b588aebf24868b /mlir/lib/IR/Module.cpp
parent85d7fb3324a6442e865c87ea766992ab096f8859 (diff)
downloadbcm5719-llvm-6df83699418c6a6d6105728cdec59c78212aa841.tar.gz
bcm5719-llvm-6df83699418c6a6d6105728cdec59c78212aa841.zip
Rename the current parseSymbolName to parseOptionalSymbolName
The current implementation silently fails if the '@' identifier isn't present, making it similar to the 'optional' parse methods. This change renames the current implementation to 'Optional' and adds a new 'parseSymbolName' that emits an error. PiperOrigin-RevId: 280214610
Diffstat (limited to 'mlir/lib/IR/Module.cpp')
-rw-r--r--mlir/lib/IR/Module.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/mlir/lib/IR/Module.cpp b/mlir/lib/IR/Module.cpp
index f5cc98e39cf..79e04521e9c 100644
--- a/mlir/lib/IR/Module.cpp
+++ b/mlir/lib/IR/Module.cpp
@@ -44,8 +44,8 @@ ModuleOp ModuleOp::create(Location loc, Optional<StringRef> name) {
ParseResult ModuleOp::parse(OpAsmParser &parser, OperationState &result) {
// If the name is present, parse it.
StringAttr nameAttr;
- (void)parser.parseSymbolName(nameAttr, mlir::SymbolTable::getSymbolAttrName(),
- result.attributes);
+ (void)parser.parseOptionalSymbolName(
+ nameAttr, mlir::SymbolTable::getSymbolAttrName(), result.attributes);
// If module attributes are present, parse them.
if (parser.parseOptionalAttrDictWithKeyword(result.attributes))
OpenPOWER on IntegriCloud