head 1.1; access; symbols pkgsrc-2026Q3:1.1.0.2 pkgsrc-2026Q3-base:1.1; locks; strict; comment @// @; 1.1 date 2026.09.15.21.10.07; author tnn; state Exp; branches; next ; commitid 54G8qKXgGbDJfLVG; desc @@ 1.1 log @llvm: fix build with xcode 27 Apply commit a558d656043734cc4d02e0a0a12e4c308c28f8c7 from upstream. I won't pretend to understand modern C++ to the extent that I can adequately explain this change, but I guess it removes UB and does not change code behaviour. @ text @$NetBSD$ https://github.com/llvm/llvm-project/commit/a558d656043734cc4d02e0a0a12e4c308c28f8c7.patch --- lib/CodeGen/RDFLiveness.cpp.orig 2025-12-12 10:35:47.000000000 +0000 +++ lib/CodeGen/RDFLiveness.cpp @@@@ -652,8 +652,9 @@@@ void Liveness::computePhiInfo() { // defs, cache the result of subtracting these defs from a given register // ref. using RefHash = std::hash; - using RefEqual = std::equal_to; - using SubMap = std::unordered_map; + using RefEqual = RegisterRefEqualTo; + using SubMap = + std::unordered_map; std::unordered_map Subs; auto ClearIn = [](RegisterRef RR, const RegisterAggr &Mid, SubMap &SM) { if (Mid.empty()) @@@@ -868,7 +869,7 @@@@ void Liveness::computeLiveIns() { std::vector LV; for (const MachineBasicBlock::RegisterMaskPair &LI : B.liveins()) LV.push_back(RegisterRef(LI.PhysReg, LI.LaneMask)); - llvm::sort(LV, std::less(PRI)); + llvm::sort(LV, RegisterRefLess(PRI)); dbgs() << printMBBReference(B) << "\t rec = {"; for (auto I : LV) dbgs() << ' ' << Print(I, DFG); @@@@ -878,7 +879,7 @@@@ void Liveness::computeLiveIns() { LV.clear(); for (RegisterRef RR : LiveMap[&B].refs()) LV.push_back(RR); - llvm::sort(LV, std::less(PRI)); + llvm::sort(LV, RegisterRefLess(PRI)); dbgs() << "\tcomp = {"; for (auto I : LV) dbgs() << ' ' << Print(I, DFG); @