[lld] [lld][WebAssembly] Fix TLS-relative relocations when linking without shared memory (PR #116136)

via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 13 17:05:35 PST 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 adfa6b762dc53bc53377785d824264a3311e829d de8fdac5f4c68dfee8f075d564b05a044858b648 --extensions cpp,h -- lld/wasm/Relocations.cpp lld/wasm/Symbols.cpp lld/wasm/Symbols.h lld/wasm/SyntheticSections.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/lld/wasm/Relocations.cpp b/lld/wasm/Relocations.cpp
index 2776ede8be..16afe5dbc2 100644
--- a/lld/wasm/Relocations.cpp
+++ b/lld/wasm/Relocations.cpp
@@ -123,8 +123,7 @@ void scanRelocations(InputChunk *chunk) {
               "`");
       }
       if (!sym->isTLS()) {
-        error(toString(file) + ": relocation " +
-              relocTypeToString(reloc.Type) +
+        error(toString(file) + ": relocation " + relocTypeToString(reloc.Type) +
               " cannot be used against non-TLS symbol `" + toString(*sym) +
               "`");
       }

``````````

</details>


https://github.com/llvm/llvm-project/pull/116136


More information about the llvm-commits mailing list