diff --git a/lld/MachO/SyntheticSections.cpp b/lld/MachO/SyntheticSections.cpp index 417b7cf93efa7..97164e5992b8c 100644 --- a/lld/MachO/SyntheticSections.cpp +++ b/lld/MachO/SyntheticSections.cpp @@ -1958,7 +1958,7 @@ void InitOffsetsSection::writeTo(uint8_t *buf) const { // FIXME: Add function specified by -init when that argument is implemented. for (ConcatInputSection *isec : sections) { for (const Reloc &rel : isec->relocs) { - const Symbol *referent = rel.referent.dyn_cast(); + const Symbol *referent = cast(rel.referent); assert(referent && "section relocation should have been rejected"); uint64_t offset = referent->getVA() - in.header->addr; // FIXME: Can we handle this gracefully?