[lld] [lld] Migrate away from PointerUnion::dyn_cast (NFC) (PR #123691)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 21 10:06:04 PST 2025


================
@@ -205,7 +205,7 @@ InputSection *ARM64::getThunkBranchTarget(InputSection *thunk) const {
   assert(isa<InputSection *>(reloc.referent) &&
          "ARM64 thunk reloc is expected to point to an InputSection");
 
-  return reloc.referent.dyn_cast<InputSection *>();
+  return dyn_cast_if_present<InputSection *>(reloc.referent);
----------------
kazutakahirata wrote:

I've created https://github.com/llvm/llvm-project/pull/123721 for this particular non-mechanical migration.  Thanks!

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


More information about the llvm-commits mailing list