LLVM 22.0.0git
llvm::IntegerInclusiveInterval Class Reference

Represents an inclusive integer interval [Begin, End] where Begin <= End. More...

#include "llvm/Support/IntegerInclusiveInterval.h"

Public Member Functions

 IntegerInclusiveInterval (int64_t Begin, int64_t End)
 Create an interval [Begin, End].
 IntegerInclusiveInterval (int64_t Single)
 Create a singleton interval [Single, Single].
int64_t getBegin () const
int64_t getEnd () const
void setBegin (int64_t NewBegin)
void setEnd (int64_t NewEnd)
bool contains (int64_t Value) const
 Check if the given value is within this interval (inclusive).
bool overlaps (const IntegerInclusiveInterval &Other) const
 Check if this interval overlaps with another interval.
void print (raw_ostream &OS) const
 Print the interval to the output stream.
bool operator== (const IntegerInclusiveInterval &Other) const

Detailed Description

Represents an inclusive integer interval [Begin, End] where Begin <= End.

Definition at line 33 of file IntegerInclusiveInterval.h.

Constructor & Destructor Documentation

◆ IntegerInclusiveInterval() [1/2]

llvm::IntegerInclusiveInterval::IntegerInclusiveInterval ( int64_t Begin,
int64_t End )
inline

Create an interval [Begin, End].

Definition at line 39 of file IntegerInclusiveInterval.h.

References assert().

Referenced by operator==(), and overlaps().

◆ IntegerInclusiveInterval() [2/2]

llvm::IntegerInclusiveInterval::IntegerInclusiveInterval ( int64_t Single)
inline

Create a singleton interval [Single, Single].

Definition at line 44 of file IntegerInclusiveInterval.h.

Member Function Documentation

◆ contains()

bool llvm::IntegerInclusiveInterval::contains ( int64_t Value) const
inline

Check if the given value is within this interval (inclusive).

Definition at line 59 of file IntegerInclusiveInterval.h.

◆ getBegin()

int64_t llvm::IntegerInclusiveInterval::getBegin ( ) const
inline

Definition at line 46 of file IntegerInclusiveInterval.h.

◆ getEnd()

int64_t llvm::IntegerInclusiveInterval::getEnd ( ) const
inline

Definition at line 47 of file IntegerInclusiveInterval.h.

◆ operator==()

bool llvm::IntegerInclusiveInterval::operator== ( const IntegerInclusiveInterval & Other) const
inline

Definition at line 74 of file IntegerInclusiveInterval.h.

References IntegerInclusiveInterval(), and llvm::Other.

◆ overlaps()

bool llvm::IntegerInclusiveInterval::overlaps ( const IntegerInclusiveInterval & Other) const
inline

Check if this interval overlaps with another interval.

Definition at line 62 of file IntegerInclusiveInterval.h.

References IntegerInclusiveInterval(), and llvm::Other.

◆ print()

void llvm::IntegerInclusiveInterval::print ( raw_ostream & OS) const
inline

Print the interval to the output stream.

Definition at line 67 of file IntegerInclusiveInterval.h.

◆ setBegin()

void llvm::IntegerInclusiveInterval::setBegin ( int64_t NewBegin)
inline

Definition at line 49 of file IntegerInclusiveInterval.h.

References assert().

◆ setEnd()

void llvm::IntegerInclusiveInterval::setEnd ( int64_t NewEnd)
inline

Definition at line 53 of file IntegerInclusiveInterval.h.

References assert().


The documentation for this class was generated from the following file: