From 89230f7bc29946d534ee26f40472babebc3e4ed5 Mon Sep 17 00:00:00 2001 From: George Rimar Date: Mon, 3 Dec 2018 14:44:02 +0000 Subject: [PATCH] [LLD][ELF] - Remove the excessive condition. NFC. There is no need to check that In.DynSymTab != nullptr, because `includeInDynsym` already checks for `!Config->HasDynSymTab` and `HasDynSymTab` is the pre-condition for In.DynSymTab creation. llvm-svn: 348143 --- lld/ELF/Writer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp index fb8d60e..9d3dfb6 100644 --- a/lld/ELF/Writer.cpp +++ b/lld/ELF/Writer.cpp @@ -1661,7 +1661,7 @@ template void Writer::finalizeSections() { if (In.SymTab) In.SymTab->addSymbol(Sym); - if (In.DynSymTab && Sym->includeInDynsym()) { + if (Sym->includeInDynsym()) { In.DynSymTab->addSymbol(Sym); if (auto *File = dyn_cast_or_null>(Sym->File)) if (File->IsNeeded && !Sym->isUndefined()) -- 2.7.4