[lld] [lld][WebAssembly] Match the ELF linker in transitioning away from archive indexes. (PR #78658)
Derek Schuff via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 19 09:00:03 PST 2024
================
@@ -716,17 +722,10 @@ static Symbol *handleUndefined(StringRef name, const char *option) {
static void handleLibcall(StringRef name) {
Symbol *sym = symtab->find(name);
- if (!sym)
- return;
-
- if (auto *lazySym = dyn_cast<LazySymbol>(sym)) {
- MemoryBufferRef mb = lazySym->getMemberBuffer();
- if (isBitcode(mb)) {
- if (!config->whyExtract.empty())
- ctx.whyExtractRecords.emplace_back("<libcall>", sym->getFile(), *sym);
- lazySym->extract();
- }
- }
+ if (sym)
----------------
dschuff wrote:
I think I prefer the original's early-return style over having the entire logic in a then-clause (especially non-braced, that seems error-prone). Is there a particular reason for that change?
https://github.com/llvm/llvm-project/pull/78658
More information about the llvm-commits
mailing list