This allows Dialect to follow the MLIR style of nullable objects, and in fact is expected by Dialect::operator bool() const which already tests whether def == nullptr. This just wasn't a reachable situation, because the constructor was dereferencing the pointer unconditionally.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Please add justification in the description for why. Seems like this could be handled wherever Dialect is being constructed.
Comment Actions
Ah, I see that it already has an operator bool. Please still add the justification though. It's just as important to know why a change is happening as it is to know what is changing.