From 89661a0e8981ac89936d1fa569211100dcc8adc8 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Tue, 14 Dec 2021 22:41:52 -0800 Subject: [PATCH] [ELF] Remove dead code from SymbolTable::find --- lld/ELF/SymbolTable.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lld/ELF/SymbolTable.cpp b/lld/ELF/SymbolTable.cpp index e615fb70a40f..406dca295650 100644 --- a/lld/ELF/SymbolTable.cpp +++ b/lld/ELF/SymbolTable.cpp @@ -105,10 +105,7 @@ Symbol *SymbolTable::find(StringRef name) { auto it = symMap.find(CachedHashStringRef(name)); if (it == symMap.end()) return nullptr; - Symbol *sym = symVector[it->second]; - if (sym->isPlaceholder()) - return nullptr; - return sym; + return symVector[it->second]; } // A version script/dynamic list is only meaningful for a Defined symbol.