1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

Implement operator== and != for ranges

llvm-svn: 3571
This commit is contained in:
Chris Lattner 2002-09-03 01:05:31 +00:00
parent 3f5cd179cb
commit 9fc380645d

View File

@ -78,6 +78,15 @@ class ConstantRange {
/// ///
uint64_t getSetSize() const; uint64_t getSetSize() const;
/// operator== - Return true if this range is equal to another range.
///
bool operator==(const ConstantRange &CR) const {
return Lower == CR.Lower && Upper == CR.Upper;
}
bool operator!=(const ConstantRange &CR) const {
return !operator==(CR);
}
/// intersect - Return the range that results from the intersection of this /// intersect - Return the range that results from the intersection of this
/// range with another range. The resultant range is pruned as much as /// range with another range. The resultant range is pruned as much as
/// possible, but there may be cases where elements are included that are in /// possible, but there may be cases where elements are included that are in