llvm-project
58660328 - [mlir] Add `MLIR_USE_FALLBACK_TYPE_IDS` macro support for `TypeID` (#126999)

Commit
263 days ago
[mlir] Add `MLIR_USE_FALLBACK_TYPE_IDS` macro support for `TypeID` (#126999) Adds a macro definition `MLIR_USE_FALLBACK_TYPE_IDS`. When this is defined, the `MLIR_{DECLARE,DEFINE}_EXPLICIT_TYPE_ID` functions explicitly fall back to string comparison. This is useful for complex shared library setups where it may be difficult to agree on a source of truth for specific type ID resolution. As long as there is a single resolution for `registerImplicitTypeID`, all type IDs can be reference a shared registration. This way types which are logically shared across multiple DSOs can have the same type ID, even if their definitions are duplicated.
Author
Parents
Loading