mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-11 22:29:37 +00:00
NewSROA: Provide a full set of operator< for ByteRanges.
MSVC8 won't compile lower_bound if one is missing. llvm-svn: 164035
This commit is contained in:
parent
bcdf671ac4
commit
4f7721c005
@ -110,8 +110,13 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// \brief Support comparison with a single offset to allow binary searches.
|
/// \brief Support comparison with a single offset to allow binary searches.
|
||||||
bool operator<(uint64_t RHSOffset) const {
|
friend bool operator<(const ByteRange &LHS, uint64_t RHSOffset) {
|
||||||
return BeginOffset < RHSOffset;
|
return LHS.BeginOffset < RHSOffset;
|
||||||
|
}
|
||||||
|
|
||||||
|
friend LLVM_ATTRIBUTE_UNUSED bool operator<(uint64_t LHSOffset,
|
||||||
|
const ByteRange &RHS) {
|
||||||
|
return LHSOffset < RHS.BeginOffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool operator==(const ByteRange &RHS) const {
|
bool operator==(const ByteRange &RHS) const {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user