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

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 21 00:19:32 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);
----------------
nikic wrote:

There's an isa above so this can be cast<>.

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


More information about the llvm-commits mailing list