[lld] [lld] Mark target section as code section when merging code sections into a data section. (PR #72030)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 11 08:19:46 PST 2023
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 5c91b2886f6bf400b60ca7839069839ac3980f8f 285156c80ecbf6a9942367b840c1496300561b13 -- lld/COFF/Writer.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/lld/COFF/Writer.cpp b/lld/COFF/Writer.cpp
index 80edda03a0a4..8c0499b9ad7a 100644
--- a/lld/COFF/Writer.cpp
+++ b/lld/COFF/Writer.cpp
@@ -351,7 +351,8 @@ void OutputSection::merge(OutputSection *other) {
// mark the target section as a code section.
if (other->header.Characteristics & IMAGE_SCN_CNT_CODE) {
header.Characteristics |= IMAGE_SCN_CNT_CODE;
- header.Characteristics &= ~IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_CNT_UNINITIALIZED_DATA;
+ header.Characteristics &=
+ ~IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_CNT_UNINITIALIZED_DATA;
}
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/72030
More information about the llvm-commits
mailing list