[LLD][ELF] - Remove the excessive condition. NFC.
authorGeorge Rimar <grimar@accesssoftek.com>
Mon, 3 Dec 2018 14:44:02 +0000 (14:44 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Mon, 3 Dec 2018 14:44:02 +0000 (14:44 +0000)
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

index fb8d60e..9d3dfb6 100644 (file)
@@ -1661,7 +1661,7 @@ template <class ELFT> void Writer<ELFT>::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<SharedFile<ELFT>>(Sym->File))
         if (File->IsNeeded && !Sym->isUndefined())