[lld] [LLD][COFF] Fix ARM64 EC chunks comparator (PR #75407)
Jacek Caban via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 14 09:14:32 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);
----------------
cjacek wrote:
Sure, I created #75495.
https://github.com/llvm/llvm-project/pull/75407
More information about the llvm-commits
mailing list