[Mlir-commits] [mlir] [mlir] Add the ability to define dialect-specific location attrs. (PR #105584)
River Riddle
llvmlistbot at llvm.org
Wed Sep 18 09:23:37 PDT 2024
================
@@ -2086,11 +2089,9 @@ ParseResult OperationParser::parseLocationAlias(LocationAttr &loc) {
Token tok = getToken();
consumeToken(Token::hash_identifier);
StringRef identifier = tok.getSpelling().drop_front();
- if (identifier.contains('.')) {
- return emitError(tok.getLoc())
- << "expected location, but found dialect attribute: '#" << identifier
- << "'";
- }
+ assert(!identifier.contains('.') &&
+ "we should not be getting hash identifiers with dots here");
----------------
River707 wrote:
```suggestion
"unexpected dialect attribute token, expected alias");
```
Would be good to have the message hint to which invariant is broken
https://github.com/llvm/llvm-project/pull/105584
More information about the Mlir-commits
mailing list