[all-commits] [llvm/llvm-project] 5d2434: [lld] Migrate away from PointerUnion::dyn_cast (NF...

Kazu Hirata via All-commits all-commits at lists.llvm.org
Mon Jan 27 10:35:15 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5d2434166787e36312f037538119d3820c5af5e6
      https://github.com/llvm/llvm-project/commit/5d2434166787e36312f037538119d3820c5af5e6
  Author: Kazu Hirata <kazu at google.com>
  Date:   2025-01-27 (Mon, 27 Jan 2025)

  Changed paths:
    M lld/MachO/ObjC.cpp
    M lld/MachO/Writer.cpp

  Log Message:
  -----------
  [lld] Migrate away from PointerUnion::dyn_cast (NFC) (#124504)

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>

This patch migrates uses of PointerUnion::dyn_cast to
dyn_cast_if_present (see the definition of PointerUnion::dyn_cast).
Note that we cannot use dyn_cast in any of the migrations in this
patch; placing

  assert(!X.isNull());

just before any of dyn_cast_if_present in this patch triggers some
failure in check-lld.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list