diff --git a/lld/ELF/SyntheticSections.cpp b/lld/ELF/SyntheticSections.cpp index 04aa066b2d29fd3d2c0d3d2ed6614f1a8e8bc831..0afe90102c9a682cfaf90c01542a69539db26a30 100644 --- a/lld/ELF/SyntheticSections.cpp +++ b/lld/ELF/SyntheticSections.cpp @@ -430,8 +430,8 @@ bool EhFrameSection::isFdeLive(EhSectionPiece &Fde, ArrayRef Rels) { // FDEs for garbage-collected or merged-by-ICF sections are dead. if (auto *D = dyn_cast(&B)) - if (auto *Sec = cast_or_null(D->Section)) - return Sec->Live && (Sec == Sec->Repl); + if (SectionBase *Sec = D->Section) + return Sec->Live; return false; }