[lld] [llvm] [WebAssembly] Add target architecture to object file format (PR #225979)

via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 23 23:57:33 PDT 2026


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,h -- lld/wasm/InputFiles.cpp lld/wasm/SyntheticSections.cpp llvm/include/llvm/BinaryFormat/Wasm.h llvm/include/llvm/ObjectYAML/WasmYAML.h llvm/lib/MC/WasmObjectWriter.cpp llvm/lib/Object/WasmObjectFile.cpp llvm/lib/ObjectYAML/WasmEmitter.cpp llvm/lib/ObjectYAML/WasmYAML.cpp llvm/tools/obj2yaml/wasm2yaml.cpp --diff_from_common_commit
``````````

: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/SyntheticSections.cpp b/lld/wasm/SyntheticSections.cpp
index e4275f1bc..c629ed3cf 100644
--- a/lld/wasm/SyntheticSections.cpp
+++ b/lld/wasm/SyntheticSections.cpp
@@ -155,8 +155,7 @@ void DylinkSection::writeBody() {
 
   {
     SubSection sub(WASM_DYLINK_TARGET_ARCH);
-    writeStr(sub.os,
-             ctx.arg.is64.value_or(false) ? "wasm64" : "wasm32",
+    writeStr(sub.os, ctx.arg.is64.value_or(false) ? "wasm64" : "wasm32",
              "target arch");
     sub.writeTo(os);
   }
@@ -817,8 +816,7 @@ void LinkingSection::writeBody() {
 
   {
     SubSection sub(WASM_TARGET_ARCH);
-    writeStr(sub.os,
-             ctx.arg.is64.value_or(false) ? "wasm64" : "wasm32",
+    writeStr(sub.os, ctx.arg.is64.value_or(false) ? "wasm64" : "wasm32",
              "target arch");
     sub.writeTo(os);
   }

``````````

</details>


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


More information about the llvm-commits mailing list