1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00

New helper method

llvm-svn: 15138
This commit is contained in:
Chris Lattner 2004-07-23 18:39:12 +00:00
parent b05751f2c7
commit 56e3526765

View File

@ -36,13 +36,19 @@ namespace llvm {
assert(S < E && "Cannot create empty or backwards range");
}
/// contains - Return true if the index is covered by this range.
///
bool contains(unsigned I) const {
return start <= I && I < end;
}
bool operator<(const LiveRange &LR) const {
return start < LR.start || (start == LR.start && end < LR.end);
}
bool operator==(const LiveRange &LR) const {
return start == LR.start && end == LR.end;
}
private:
private:
LiveRange(); // DO NOT IMPLEMENT
};
std::ostream& operator<<(std::ostream& os, const LiveRange &LR);