[lld] [lld][WebAssembly] Fix visibility of `__stack_pointer` global (PR #161284)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 29 14:46:37 PDT 2025
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 origin/main HEAD --extensions cpp -- lld/wasm/Driver.cpp
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</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 2b50a02b7..46c848d5c 100644
--- a/lld/wasm/Driver.cpp
+++ b/lld/wasm/Driver.cpp
@@ -914,8 +914,8 @@ static InputGlobal *createGlobal(StringRef name, bool isMutable) {
return make<InputGlobal>(wasmGlobal, nullptr);
}
-static GlobalSymbol *
-createGlobalVariable(StringRef name, bool isMutable, uint32_t flags = 0) {
+static GlobalSymbol *createGlobalVariable(StringRef name, bool isMutable,
+ uint32_t flags = 0) {
InputGlobal *g = createGlobal(name, isMutable);
return symtab->addSyntheticGlobal(name, flags, g);
}
@@ -968,8 +968,8 @@ static void createSyntheticSymbols() {
if (ctx.arg.sharedMemory) {
// TLS symbols are all hidden/dso-local
- ctx.sym.tlsBase = createGlobalVariable("__tls_base", true,
- WASM_SYMBOL_VISIBILITY_HIDDEN);
+ ctx.sym.tlsBase =
+ createGlobalVariable("__tls_base", true, WASM_SYMBOL_VISIBILITY_HIDDEN);
ctx.sym.tlsSize = createGlobalVariable("__tls_size", false,
WASM_SYMBOL_VISIBILITY_HIDDEN);
ctx.sym.tlsAlign = createGlobalVariable("__tls_align", false,
``````````
</details>
https://github.com/llvm/llvm-project/pull/161284
More information about the llvm-commits
mailing list