[lld] [lld/MachO] Fix assert on unsorted data-in-code entries (PR #81758)

via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 14 08:34:01 PST 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 2d7fdfa61f8b037ce65e9c5482f422b37d6c0b99 edd292b29c91c380722fcad095fa4441fd8a3756 -- lld/MachO/SyntheticSections.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 6dbf27034f..a5d66bb4ea 100644
--- a/lld/MachO/SyntheticSections.cpp
+++ b/lld/MachO/SyntheticSections.cpp
@@ -1053,7 +1053,7 @@ static std::vector<MachO::data_in_code_entry> collectDataInCodeEntries() {
     std::vector<MachO::data_in_code_entry> sortedEntries;
     sortedEntries.assign(entries.begin(), entries.end());
     llvm::sort(sortedEntries, [](const data_in_code_entry &lhs,
-                                      const data_in_code_entry &rhs) {
+                                 const data_in_code_entry &rhs) {
       return lhs.offset < rhs.offset;
     });
 

``````````

</details>


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


More information about the llvm-commits mailing list