[lld] [LLD][COFF] Fix ARM64 EC chunks comparator (PR #75407)
Alexandre Ganea via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 14 07:58:09 PST 2023
================
@@ -1480,7 +1480,8 @@ void Writer::sortECChunks() {
llvm::stable_sort(sec->chunks, [=](const Chunk *a, const Chunk *b) {
std::optional<chpe_range_type> aType = a->getArm64ECRangeType(),
bType = b->getArm64ECRangeType();
- return !aType || (bType && *aType < *bType);
+ return (!aType ? 0 : (unsigned)*aType + 1) <
+ (!bType ? 0 : (unsigned)*bType + 1);
----------------
aganea wrote:
Thanks for getting back! Since you already have a diff ready do you mind sending out the PR & landing it? I can close this in that case.
https://github.com/llvm/llvm-project/pull/75407
More information about the llvm-commits
mailing list