[llvm] [SandboxVec][Interval] Implement Interval::comesBefore() (PR #112026)
Sriraman Tallam via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 11 11:49:42 PDT 2024
================
@@ -127,6 +127,12 @@ template <typename T> class Interval {
}
/// Inequality.
bool operator!=(const Interval &Other) const { return !(*this == Other); }
+ /// \Returns true if this interval comes before \p Other in program order.
+ /// This expects disjoint intervals.
+ bool comesBefore(const Interval &Other) const {
+ assert(disjoint(Other) && "Expect disjoint intervals!");
+ return bottom()->comesBefore(Other.top());
+ }
----------------
tmsri wrote:
LGTM
https://github.com/llvm/llvm-project/pull/112026
More information about the llvm-commits
mailing list