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;
69 return std::binary_search(Ranges.
begin(), Ranges.
end(),
C);
75 bool rangesAreValid()
const {
79 if (
I != Ranges.
begin() && Prev >=
I->Lower) {
82 DEBUG(
dbgs() <<
" should be less than succeeding lower bound 0x");
86 if (
I->Upper <
I->Lower) {
89 DEBUG(
dbgs() <<
" should not be less than lower bound 0x");
102 #undef DEBUG_TYPE // "unicode"
108 #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)...
static GCRegistry::Add< CoreCLRGC > E("coreclr","CoreCLR-compatible GC")
ArrayRef< UnicodeCharRange > CharRanges
static GCRegistry::Add< ShadowStackGC > C("shadow-stack","Very portable GC for uncooperative code generators")
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...
void write_hex(raw_ostream &S, uint64_t N, HexPrintStyle Style, Optional< size_t > Width=None)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
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.