9 #ifndef LLVM_SUPPORT_UNICODECHARRANGES_H
10 #define LLVM_SUPPORT_UNICODECHARRANGES_H
32 return Value < Range.
Lower;
35 return Range.
Upper < Value;
53 assert(rangesAreValid());
59 return std::binary_search(Ranges.
begin(), Ranges.
end(),
C);
65 bool rangesAreValid()
const {
69 if (
I != Ranges.
begin() && Prev >=
I->Lower) {
72 DEBUG(
llvm::dbgs() <<
" should be less than succeeding lower bound 0x");
76 if (
I->Upper <
I->Lower) {
96 #endif // LLVM_SUPPORT_UNICODECHARRANGES_H
bool operator<(uint32_t Value, UnicodeCharRange Range)
llvm::ArrayRef< UnicodeCharRange > CharRanges
raw_ostream & dbgs()
dbgs - Return a circular-buffered debug stream.
Holds a reference to an ordered array of UnicodeCharRange and allows to quickly check if a code point...
UnicodeCharSet(CharRanges Ranges)
Constructs a UnicodeCharSet instance from an array of UnicodeCharRanges.
Represents a closed range of Unicode code points [Lower, Upper].
LLVM Value Representation.
bool contains(uint32_t C) const
Returns true if the character set contains the Unicode code point C.