9 #ifndef LLVM_SUPPORT_UNICODECHARRANGES_H
10 #define LLVM_SUPPORT_UNICODECHARRANGES_H
24 #define DEBUG_TYPE "unicode"
33 return Value < Range.
Lower;
36 return Range.
Upper < Value;
57 assert(rangesAreValid());
64 return std::binary_search(Ranges.
begin(), Ranges.
end(), C);
70 bool rangesAreValid()
const {
74 if (
I != Ranges.
begin() && Prev >=
I->Lower) {
77 DEBUG(
dbgs() <<
" should be less than succeeding lower bound 0x");
81 if (
I->Upper <
I->Lower) {
84 DEBUG(
dbgs() <<
" should not be less than lower bound 0x");
97 #undef DEBUG_TYPE // "unicode"
103 #endif // LLVM_SUPPORT_UNICODECHARRANGES_H
bool operator<(uint32_t Value, UnicodeCharRange Range)
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
ArrayRef< UnicodeCharRange > CharRanges
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
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.