[lld] r320597 - Simplify. NFC.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 13 09:36:53 PST 2017
Author: rafael
Date: Wed Dec 13 09:36:53 2017
New Revision: 320597
URL: http://llvm.org/viewvc/llvm-project?rev=320597&view=rev
Log:
Simplify. NFC.
If a section has been replaced (Sec != Sec->Repl) it is not Live.
Modified:
lld/trunk/ELF/SyntheticSections.cpp
Modified: lld/trunk/ELF/SyntheticSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SyntheticSections.cpp?rev=320597&r1=320596&r2=320597&view=diff
==============================================================================
--- lld/trunk/ELF/SyntheticSections.cpp (original)
+++ lld/trunk/ELF/SyntheticSections.cpp Wed Dec 13 09:36:53 2017
@@ -430,8 +430,8 @@ bool EhFrameSection::isFdeLive(EhSection
// FDEs for garbage-collected or merged-by-ICF sections are dead.
if (auto *D = dyn_cast<Defined>(&B))
- if (auto *Sec = cast_or_null<InputSectionBase>(D->Section))
- return Sec->Live && (Sec == Sec->Repl);
+ if (SectionBase *Sec = D->Section)
+ return Sec->Live;
return false;
}
More information about the llvm-commits
mailing list