Commit ac42dbb
committed
[memprof] Migrate away from PointerUnion::dyn_cast (NFC)
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 dyn_cast
because we expect the arguments to be nonnull. Note that all these
cases have assert and/or dereferences just after dyn_cast, implying
that the return value from dyn_cast must be nonnull.
This patch uses cast<CallsiteInfo *> instead of
dyn_cast<CallsiteInfo *> in one place where we know that the argument
satisfies isa<CallsiteInfo *> because of the "if" condition.1 parent 547bfda commit ac42dbb
1 file changed
+5
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3542 | 3542 | | |
3543 | 3543 | | |
3544 | 3544 | | |
3545 | | - | |
| 3545 | + | |
3546 | 3546 | | |
3547 | 3547 | | |
3548 | 3548 | | |
| |||
3560 | 3560 | | |
3561 | 3561 | | |
3562 | 3562 | | |
3563 | | - | |
| 3563 | + | |
3564 | 3564 | | |
3565 | 3565 | | |
3566 | 3566 | | |
| |||
3579 | 3579 | | |
3580 | 3580 | | |
3581 | 3581 | | |
3582 | | - | |
| 3582 | + | |
3583 | 3583 | | |
3584 | 3584 | | |
3585 | 3585 | | |
| |||
3630 | 3630 | | |
3631 | 3631 | | |
3632 | 3632 | | |
3633 | | - | |
| 3633 | + | |
3634 | 3634 | | |
3635 | 3635 | | |
3636 | 3636 | | |
3637 | 3637 | | |
3638 | 3638 | | |
3639 | | - | |
| 3639 | + | |
3640 | 3640 | | |
3641 | 3641 | | |
3642 | 3642 | | |
| |||
0 commit comments