[lld] f5e58a0 - [lld][ELF] Simplify handleLibcall. NFC (#78659)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 19 12:39:39 PST 2024
Author: Sam Clegg
Date: 2024-01-19T12:39:35-08:00
New Revision: f5e58a038033c8736fed91a7e89a5faad462abcc
URL: https://github.com/llvm/llvm-project/commit/f5e58a038033c8736fed91a7e89a5faad462abcc
DIFF: https://github.com/llvm/llvm-project/commit/f5e58a038033c8736fed91a7e89a5faad462abcc.diff
LOG: [lld][ELF] Simplify handleLibcall. NFC (#78659)
I noticed this while working on #78658
Added:
Modified:
lld/ELF/Driver.cpp
Removed:
################################################################################
diff --git a/lld/ELF/Driver.cpp b/lld/ELF/Driver.cpp
index 5ccc65600dcb91..07f4263c90e62b 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<LazyObject>(sym)->file->mb;
-
- if (isBitcode(mb))
+ if (sym && sym->isLazy() && isa<BitcodeFile>(sym->file))
sym->extract();
}
More information about the llvm-commits
mailing list