From 322e1294d375abf9dcbf5c0135dc5e7a91ec87a3 Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Fri, 19 Jan 2024 02:14:58 +0000 Subject: [PATCH] [lld][ELF] Simplify handleLibcall. NFC I noticed this while working on #78658 --- lld/ELF/Driver.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/lld/ELF/Driver.cpp b/lld/ELF/Driver.cpp index 5ccc65600dcb9..07f4263c90e62 100644 --- a/lld/ELF/Driver.cpp +++ b/lld/ELF/Driver.cpp @@ -2081,13 +2081,7 @@ static void handleUndefinedGlob(StringRef arg) { static void handleLibcall(StringRef name) { Symbol *sym = symtab.find(name); - if (!sym || !sym->isLazy()) - return; - - MemoryBufferRef mb; - mb = cast(sym)->file->mb; - - if (isBitcode(mb)) + if (sym && sym->isLazy() && isa(sym->file)) sym->extract(); }