[PATCH] D153466: [lld][WebAssembly] Process stub libraries in a loop

Alon Zakai via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 11 10:47:01 PDT 2023


kripken accepted this revision.
kripken added inline comments.
This revision is now accepted and ready to land.


================
Comment at: lld/wasm/Driver.cpp:913
           else
-            LLVM_DEBUG(llvm::dbgs()
-                       << "force export: " << toString(*needed) << "\n");
-          needed->forceExport = true;
-          if (auto *lazy = dyn_cast<LazySymbol>(needed)) {
-            lazy->fetch();
-            if (!config->whyExtract.empty())
-              config->whyExtractRecords.emplace_back(stub_file->getName(),
-                                                     sym->getFile(), *sym);
+            LLVM_DEBUG(llvm::dbgs() << "stub symbol not needed: `" << name << "`\n");
+          continue;
----------------
sbc100 wrote:
> kripken wrote:
> > I'm not that familiar with the LLVM codebase - is this a common pattern? What does `message` do?
> This is the way we write to stderr for messages to that are designed to end users to see.
> 
> In this case we print some extra info about a symbol if the user passes `--trace=<symname>`
Ah, I see, thanks! Makes sense.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D153466/new/

https://reviews.llvm.org/D153466



More information about the llvm-commits mailing list