Skip to content

Commit 1618d09

Browse files
authored
[TypeID] Update private typeid definition in DeferredLocInfo (#128968)
The parser's `DeferredLocInfo` uses an uncommon TypeID setup, where it defines a private TypeID for pointers to the struct. When using the fallback TypeID mechanism introduced in #126999, the fallback TypeID mechanism doesn't support anonymous namespaces, and the `INTERNAL_INLINE` mechanism doesn't support pointer types. Explicitly use `SELF_OWNING_TYPE_ID` for this case. This should always be safe for anonymous namespaces.
1 parent adf0abf commit 1618d09

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mlir/lib/AsmParser/Parser.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -839,8 +839,8 @@ class OperationParser : public Parser {
839839
};
840840
} // namespace
841841

842-
MLIR_DECLARE_EXPLICIT_TYPE_ID(OperationParser::DeferredLocInfo *)
843-
MLIR_DEFINE_EXPLICIT_TYPE_ID(OperationParser::DeferredLocInfo *)
842+
MLIR_DECLARE_EXPLICIT_SELF_OWNING_TYPE_ID(OperationParser::DeferredLocInfo *)
843+
MLIR_DEFINE_EXPLICIT_SELF_OWNING_TYPE_ID(OperationParser::DeferredLocInfo *)
844844

845845
OperationParser::OperationParser(ParserState &state, ModuleOp topLevelOp)
846846
: Parser(state), opBuilder(topLevelOp.getRegion()), topLevelOp(topLevelOp) {

0 commit comments

Comments
 (0)