[lld] [lld-macho] Implement support for ObjC relative method lists (PR #86231)

via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 27 09:44:02 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 2cb7ea1553a5c7be81bee4ed3c51b7727b9d2ee8 4039a93709fbb84354b951d2562a52182131f400 -- lld/MachO/Config.h lld/MachO/Driver.cpp lld/MachO/InputSection.cpp lld/MachO/InputSection.h lld/MachO/MapFile.cpp lld/MachO/ObjC.h lld/MachO/SyntheticSections.cpp lld/MachO/SyntheticSections.h lld/MachO/Writer.cpp
``````````

</details>

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

``````````diff
diff --git a/lld/MachO/SyntheticSections.cpp b/lld/MachO/SyntheticSections.cpp
index 8d6569d818..808ea8eac6 100644
--- a/lld/MachO/SyntheticSections.cpp
+++ b/lld/MachO/SyntheticSections.cpp
@@ -2137,7 +2137,8 @@ ObjCMethListSection::writeRelativeMethodList(const ConcatInputSection *isec,
   uint32_t structSizeAndFlags = 0, structCount = 0;
   readMethodListHeader(isec->data.data(), structSizeAndFlags, structCount);
   // Set the struct size for the relative method list
-  uint32_t relativeStructSizeAndFlags = (relativeOffsetSize * pointersPerStruct) & structSizeMask;
+  uint32_t relativeStructSizeAndFlags =
+      (relativeOffsetSize * pointersPerStruct) & structSizeMask;
   // Carry over the old flags from the input struct
   relativeStructSizeAndFlags |= structSizeAndFlags & structFlagsMask;
   // Set the relative method list flag

``````````

</details>


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


More information about the llvm-commits mailing list