mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-03 13:31:05 +00:00
Implement operator== and != for ranges
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3571 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
eaee9e1317
commit
625ea21205
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user