diff --git a/lld/MachO/Relocations.cpp b/lld/MachO/Relocations.cpp index aac0e1bd3c9e0..78cc13388d6eb 100644 --- a/lld/MachO/Relocations.cpp +++ b/lld/MachO/Relocations.cpp @@ -32,7 +32,7 @@ InputSection *Reloc::getReferentInputSection() const { } StringRef Reloc::getReferentString() const { - if (auto *isec = referent.dyn_cast()) { + if (auto *isec = dyn_cast(referent)) { const auto *cisec = dyn_cast(isec); assert(cisec && "referent must be a CStringInputSection"); return cisec->getStringRefAtOffset(addend);