[lld] [lld][WebAssembly] Add new __rodata_start/__rodata_end symbols (PR #172102)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 12 15:51:57 PST 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 h,cpp -- lld/wasm/Config.h lld/wasm/Driver.cpp lld/wasm/Writer.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/Writer.cpp b/lld/wasm/Writer.cpp
index 4389d002c..0e7d965e7 100644
--- a/lld/wasm/Writer.cpp
+++ b/lld/wasm/Writer.cpp
@@ -401,7 +401,8 @@ void Writer::layoutMemory() {
}
}
- if (ctx.sym.rodataStart && seg->name.starts_with(".rodata") && !ctx.sym.rodataStart->getVA())
+ if (ctx.sym.rodataStart && seg->name.starts_with(".rodata") &&
+ !ctx.sym.rodataStart->getVA())
ctx.sym.rodataStart->setVA(memoryPtr);
memoryPtr += seg->size;
``````````
</details>
https://github.com/llvm/llvm-project/pull/172102
More information about the llvm-commits
mailing list