|
LLVM 22.0.0git
|
Typedefs | |
| using | IntervalList = SmallVector<IntegerInclusiveInterval, 8> |
| A list of integer intervals. | |
Functions | |
| Expected< IntervalList > | parseIntervals (StringRef IntervalStr, char Separator=',') |
| Parse a interval specification string like "1-10,20-30,45" or "1-10:20-30:45". | |
| bool | contains (ArrayRef< IntegerInclusiveInterval > Intervals, int64_t Value) |
| Check if a value is contained in any of the intervals. | |
| void | printIntervals (raw_ostream &OS, ArrayRef< IntegerInclusiveInterval > Intervals, char Separator=',') |
| Print intervals to output stream. | |
| IntervalList | mergeAdjacentIntervals (ArrayRef< IntegerInclusiveInterval > Intervals) |
| Merge adjacent/consecutive intervals into single intervals. | |
A list of integer intervals.
Definition at line 82 of file IntegerInclusiveInterval.h.
| bool llvm::IntegerInclusiveIntervalUtils::contains | ( | ArrayRef< IntegerInclusiveInterval > | Intervals, |
| int64_t | Value ) |
Check if a value is contained in any of the intervals.
Definition at line 78 of file IntegerInclusiveInterval.cpp.
Referenced by llvm::OptBisect::shouldRunPass().
| IntervalList llvm::IntegerInclusiveIntervalUtils::mergeAdjacentIntervals | ( | ArrayRef< IntegerInclusiveInterval > | Intervals | ) |
Merge adjacent/consecutive intervals into single intervals.
Example: [1-3, 4-6, 8-10] -> [1-6, 8-10].
Definition at line 103 of file IntegerInclusiveInterval.cpp.
References llvm::ArrayRef< T >::drop_front(), llvm::ArrayRef< T >::empty(), and llvm::Last.
| Expected< IntervalList > llvm::IntegerInclusiveIntervalUtils::parseIntervals | ( | StringRef | IntervalStr, |
| char | Separator = ',' ) |
Parse a interval specification string like "1-10,20-30,45" or "1-10:20-30:45".
Intervals must be in increasing order and non-overlapping.
| IntervalStr | The string to parse. |
| Separator | The separator character to use (',' or ':'). |
Definition at line 26 of file IntegerInclusiveInterval.cpp.
References llvm::SmallVectorTemplateCommon< T, typename >::back(), llvm::c_str(), llvm::createStringError(), llvm::SmallVectorTemplateCommon< T, typename >::empty(), llvm::Regex::match(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), and llvm::split().
Referenced by llvm::DebugCounter::push_back().
| void llvm::IntegerInclusiveIntervalUtils::printIntervals | ( | raw_ostream & | OS, |
| ArrayRef< IntegerInclusiveInterval > | Intervals, | ||
| char | Separator = ',' ) |
Print intervals to output stream.
| OS | The output stream to print to. |
| Intervals | The intervals to print. |
| Separator | The separator character to use between intervals (i.e. ',' or ':'). |
Definition at line 86 of file IntegerInclusiveInterval.cpp.
References llvm::ArrayRef< T >::empty().
Referenced by llvm::DebugCounter::printChunks().