Skip to content

Commit a0ec385

Browse files
[lld] Migrate away from PointerUnion::dyn_cast (NFC) (#123721)
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 know expect isa<InputSection *>(reloc.referent) to be true.
1 parent 662133a commit a0ec385

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lld/MachO/Arch/ARM64.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ InputSection *ARM64::getThunkBranchTarget(InputSection *thunk) const {
205205
assert(isa<InputSection *>(reloc.referent) &&
206206
"ARM64 thunk reloc is expected to point to an InputSection");
207207

208-
return reloc.referent.dyn_cast<InputSection *>();
208+
return cast<InputSection *>(reloc.referent);
209209
}
210210

211211
uint32_t ARM64::getICFSafeThunkSize() const { return sizeof(icfSafeThunkCode); }

0 commit comments

Comments
 (0)