[lld] [lld][WebAssembly] Fix stub library deps causing LTO archive members to be required post-LTO (PR #101894)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 4 08:32:13 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 0dba5381d8c8e4cadc32a067bf2fe5e3486ae53d a2e7093cc029b0c943cab310ebc04ddd7fa4d7ed --extensions cpp -- lld/wasm/Driver.cpp lld/wasm/InputFiles.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/lld/wasm/Driver.cpp b/lld/wasm/Driver.cpp
index f8a163ee39..9438cc917b 100644
--- a/lld/wasm/Driver.cpp
+++ b/lld/wasm/Driver.cpp
@@ -945,8 +945,7 @@ static void processStubLibrariesPreLTO() {
// undefined, then mark the dependent symbols as used by a regular
// object so they will be preserved and exported by the LTO process.
if (!sym || sym->isUndefined()) {
- LLVM_DEBUG(llvm::dbgs()
- << "marking symbol deps: " << name << "\n");
+ LLVM_DEBUG(llvm::dbgs() << "marking symbol deps: " << name << "\n");
for (const auto dep : deps) {
auto* needed = symtab->find(dep);
if (needed ) {
@@ -958,8 +957,8 @@ static void processStubLibrariesPreLTO() {
// beeing performed at that point.
if (needed->isLazy() && isa<BitcodeFile>(needed->getFile())) {
if (!config->whyExtract.empty())
- ctx.whyExtractRecords.emplace_back("<stubdep>", needed->getFile(),
- *needed);
+ ctx.whyExtractRecords.emplace_back("<stubdep>",
+ needed->getFile(), *needed);
cast<LazySymbol>(needed)->extract();
}
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/101894
More information about the llvm-commits
mailing list