[lld] [lld][ELF] Combine uniqued small data sections (PR #104485)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 16 05:26:11 PDT 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 7332713b8eea9bb84d8481376f62b8de7c0ddb3a 5851747b9abcc4d54041f456c5e6856b38be1b8d --extensions cpp -- lld/ELF/LinkerScript.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp
index ad80b9000a..01c15d79e7 100644
--- a/lld/ELF/LinkerScript.cpp
+++ b/lld/ELF/LinkerScript.cpp
@@ -106,11 +106,13 @@ static StringRef getOutputSectionName(const InputSectionBase *s) {
return ".text";
}
- for (StringRef v :
- {".data.rel.ro", ".data", ".rodata", ".bss.rel.ro", ".bss", ".ldata",
- ".lrodata", ".lbss", ".gcc_except_table", ".init_array", ".fini_array",
- ".tbss", ".tdata", ".ARM.exidx", ".ARM.extab", ".ctors", ".dtors",
- ".sbss", ".sdata", ".srodata"})
+ for (StringRef v : {".data.rel.ro", ".data", ".rodata",
+ ".bss.rel.ro", ".bss", ".ldata",
+ ".lrodata", ".lbss", ".gcc_except_table",
+ ".init_array", ".fini_array", ".tbss",
+ ".tdata", ".ARM.exidx", ".ARM.extab",
+ ".ctors", ".dtors", ".sbss",
+ ".sdata", ".srodata"})
if (isSectionPrefix(v, s->name))
return v;
``````````
</details>
https://github.com/llvm/llvm-project/pull/104485
More information about the llvm-commits
mailing list