summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lld/ELF/Writer.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp
index 8739a33325c..584acdcbdae 100644
--- a/lld/ELF/Writer.cpp
+++ b/lld/ELF/Writer.cpp
@@ -554,8 +554,7 @@ template <class ELFT> void Writer<ELFT>::createSections() {
for (const std::unique_ptr<ObjectFile<ELFT>> &F : Symtab.getObjectFiles())
for (InputSectionBase<ELFT> *B : F->getSections())
if (auto *S = dyn_cast_or_null<InputSection<ELFT>>(B))
- if (S != &InputSection<ELFT>::Discarded)
- if (S->isLive())
+ if (S != &InputSection<ELFT>::Discarded && S->isLive())
scanRelocs(*S);
std::vector<DefinedCommon<ELFT> *> CommonSymbols;
OpenPOWER on IntegriCloud