[llvm] Fix issues with GlobalMerge on Mach-O. (PR #110046)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 25 14:48:39 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 315ba7740663208f8bc45a7e4f145dc1df79500c e4ddbbbe3c280e73c774621c39b437715b16cbff --extensions cpp -- llvm/lib/CodeGen/GlobalMerge.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/CodeGen/GlobalMerge.cpp b/llvm/lib/CodeGen/GlobalMerge.cpp
index 2003b74a31..007bea9a65 100644
--- a/llvm/lib/CodeGen/GlobalMerge.cpp
+++ b/llvm/lib/CodeGen/GlobalMerge.cpp
@@ -651,10 +651,11 @@ void GlobalMergeImpl::setMustKeepGlobalVariables(Module &M) {
//
// See also ObjFile::parseSections and getRecordSize in lld/MachO/InputFiles.cpp
static bool isSpecialMachOSection(StringRef Section) {
- // Uses starts_with, since section attributes can appear at the end of the name.
+ // Uses starts_with, since section attributes can appear at the end of the
+ // name.
return Section.starts_with("__DATA,__cfstring") ||
- Section.starts_with("__DATA,__objc_classrefs") ||
- Section.starts_with("__DATA,__objc_selrefs");
+ Section.starts_with("__DATA,__objc_classrefs") ||
+ Section.starts_with("__DATA,__objc_selrefs");
}
bool GlobalMergeImpl::run(Module &M) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/110046
More information about the llvm-commits
mailing list