[lld] [lld-macho] Add swift support to ObjC category merger (PR #95124)

via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 12 15:14:14 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 503fb1aaf4b322173721fbf3855f2168cf6b230b 5c39455b864d76c0f3c8bbdabcb60afb21b2d633 -- lld/MachO/ObjC.cpp lld/MachO/ObjC.h
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/lld/MachO/ObjC.cpp b/lld/MachO/ObjC.cpp
index 744e167a7b..4812f759e9 100644
--- a/lld/MachO/ObjC.cpp
+++ b/lld/MachO/ObjC.cpp
@@ -680,8 +680,10 @@ void ObjcCategoryMerger::parseProtocolListInfo(const ConcatInputSection *isec,
       /*header(count)*/ protocolListHeaderLayout.totalSize +
       /*extra null value*/ target->wordSize;
 
-  // On Swift, the protocol list does not have the extra (unnecessary) null value
-  [[maybe_unused]] uint32_t expectedListSizeSwift = expectedListSize - target->wordSize;
+  // On Swift, the protocol list does not have the extra (unnecessary) null
+  // value
+  [[maybe_unused]] uint32_t expectedListSizeSwift =
+      expectedListSize - target->wordSize;
 
   assert((expectedListSize == ptrListSym->isec()->data.size() ||
           expectedListSizeSwift == ptrListSym->isec()->data.size()) &&

``````````

</details>


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


More information about the llvm-commits mailing list