From: George Rimar Date: Mon, 3 Dec 2018 14:44:02 +0000 (+0000) Subject: [LLD][ELF] - Remove the excessive condition. NFC. X-Git-Tag: llvmorg-8.0.0-rc1~3057 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=89230f7bc29946d534ee26f40472babebc3e4ed5;p=platform%2Fupstream%2Fllvm.git [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 --- 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())