Make Dialect::getRegisteredInterface const. This is just an API change.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
I have this ExtensibleDialect class that extend Dialect (and that is used by multiple dialects). In order to cast a Dialect to an ExtensibleDialect, I retrieve an interface that is only implemented on ExtensibleDialect.
Since classof requires a const Dialect*, I cannot currently retrieve the interface in this function.
Comment Actions
I would cast away the const wherever you are encountering it (if it is required there). Technically Dialect shouldn't have any const API(https://mlir.llvm.org/docs/Rationale/UsageOfConst/), but it looks like that is being broken in a few places.