[lld] r316163 - [ELF] - Simplify. NFC.
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 19 08:03:59 PDT 2017
Author: grimar
Date: Thu Oct 19 08:03:59 2017
New Revision: 316163
URL: http://llvm.org/viewvc/llvm-project?rev=316163&view=rev
Log:
[ELF] - Simplify. NFC.
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=316163&r1=316162&r2=316163&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Thu Oct 19 08:03:59 2017
@@ -730,9 +730,7 @@ static DefinedRegular *
addOptionalRegular(StringRef Name, SectionBase *Sec, uint64_t Val,
uint8_t StOther = STV_HIDDEN, uint8_t Binding = STB_GLOBAL) {
SymbolBody *S = Symtab->find(Name);
- if (!S)
- return nullptr;
- if (S->isInCurrentDSO())
+ if (!S || S->isInCurrentDSO())
return nullptr;
Symbol *Sym = Symtab->addRegular<ELFT>(Name, StOther, STT_NOTYPE, Val,
/*Size=*/0, Binding, Sec,
More information about the llvm-commits
mailing list