Kazu Hirata debe7bd916
[memprof] Migrate away from PointerUnion::dyn_cast (NFC) (#123716)
Note that PointerUnion::dyn_cast has been soft deprecated in
PointerUnion.h:

  // FIXME: Replace the uses of is(), get() and dyn_cast() with
  //        isa<T>, cast<T> and the llvm::dyn_cast<T>

Literal migration would result in dyn_cast_if_present (see the
definition of PointerUnion::dyn_cast), but this patch uses cast
because we expect the arguments to be of the requested types.  Note
that all these cases have assert and/or dereferences just after cast,
implying that the return value from cast must be nonnull.

---------

Co-authored-by: Nikita Popov <github@npopov.com>
2025-01-21 15:02:41 -08:00
..