[llvm] [Object] Provide operator< for ELFSymbolRef (PR #89861)
Amir Ayupov via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 24 18:32:07 PDT 2024
================
@@ -199,6 +199,14 @@ class ELFSymbolRef : public SymbolRef {
}
};
+inline bool operator<(const ELFSymbolRef &A, const ELFSymbolRef &B) {
+ const DataRefImpl &DRIA = A.getRawDataRefImpl();
+ const DataRefImpl &DRIB = B.getRawDataRefImpl();
+ if (DRIA.d.a == DRIB.d.a)
+ return DRIA.d.b < DRIB.d.b;
+ return DRIA.d.a < DRIB.d.b;
----------------
aaupov wrote:
Thanks. Fixed.
https://github.com/llvm/llvm-project/pull/89861
More information about the llvm-commits
mailing list