================ @@ -401,7 +401,22 @@ class RangeSet { friend class Factory; }; -using ConstraintMap = llvm::ImmutableMap<SymbolRef, RangeSet>; +struct ConstraintKVInfo : llvm::ImutKeyValueInfo<SymbolRef, RangeSet> { + static inline bool isEqual(key_type_ref L, key_type_ref R) { + return L->getAllocID() == R->getAllocID(); + } + + static inline bool isLess(key_type_ref L, key_type_ref R) { + return L->getAllocID() < R->getAllocID(); + } + + static inline void Profile(llvm::FoldingSetNodeID &ID, value_type_ref V) { + ID.AddInteger(V.first->getAllocID()); + ID.Add(V.second); + } +}; + +using ConstraintMap = llvm::ImmutableMap<SymbolRef, RangeSet, ConstraintKVInfo>; ---------------- steakhal wrote:
Shouldn't this ordering be a more sensible ordering for all containers where SymbolRefs are the keys? https://github.com/llvm/llvm-project/pull/121347 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits