From 13dbf944d8f84602e02b71cda7f45a6ddade88f6 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Wed, 13 Dec 2017 17:36:53 +0000 Subject: [PATCH] Simplify. NFC. If a section has been replaced (Sec != Sec->Repl) it is not Live. llvm-svn: 320597 --- lld/ELF/SyntheticSections.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lld/ELF/SyntheticSections.cpp b/lld/ELF/SyntheticSections.cpp index 04aa066b2d29..0afe90102c9a 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; } -- GitLab