diff --git a/lld/ELF/Driver.cpp b/lld/ELF/Driver.cpp index 5ccc65600dcb..07f4263c90e6 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(); }