[ELF] - Simplify. NFC.

llvm-svn: 316163
This commit is contained in:
George Rimar
2017-10-19 15:03:59 +00:00
parent fdd63d1535
commit 1c09dfe2bc

View File

@@ -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,