[lld] r348143 - [LLD][ELF] - Remove the excessive condition. NFC.
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 3 06:44:02 PST 2018
Author: grimar
Date: Mon Dec 3 06:44:02 2018
New Revision: 348143
URL: http://llvm.org/viewvc/llvm-project?rev=348143&view=rev
Log:
[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.
Modified:
lld/trunk/ELF/Writer.cpp
Modified: lld/trunk/ELF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=348143&r1=348142&r2=348143&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Mon Dec 3 06:44:02 2018
@@ -1661,7 +1661,7 @@ template <class ELFT> void Writer<ELFT>:
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())
More information about the llvm-commits
mailing list