[Mlir-commits] [mlir] [mlir] Migrate away from PointerUnion::dyn_cast (NFC) (PR #123693)

Kazu Hirata llvmlistbot at llvm.org
Tue Jan 21 00:51:47 PST 2025


kazutakahirata wrote:

> > // FIXME: Replace the uses of is(), get() and dyn_cast() with
> > // isa, cast and the llvm::dyn_cast
> 
> In this case, why do we replace it with `dyn_cast_if_present`, but not `dyn_cast`?

That's because `PointerUnion::dyn_cast` is implemented with `dyn_cast_if_present` like so:

https://github.com/llvm/llvm-project/blob/97d691b4b3f5ba446d6827fc29fbe15e44a7adac/llvm/include/llvm/ADT/PointerUnion.h#L166-L170


https://github.com/llvm/llvm-project/pull/123693


More information about the Mlir-commits mailing list