LLVM  6.0.0svn
Public Types | Public Member Functions | List of all members
llvm::sys::UnicodeCharSet Class Reference

Holds a reference to an ordered array of UnicodeCharRange and allows to quickly check if a code point is contained in the set represented by this array. More...

#include "llvm/Support/UnicodeCharRanges.h"

Public Types

typedef ArrayRef< UnicodeCharRangeCharRanges
 

Public Member Functions

 UnicodeCharSet (CharRanges Ranges)
 Constructs a UnicodeCharSet instance from an array of UnicodeCharRanges. More...
 
bool contains (uint32_t C) const
 Returns true if the character set contains the Unicode code point C. More...
 

Detailed Description

Holds a reference to an ordered array of UnicodeCharRange and allows to quickly check if a code point is contained in the set represented by this array.

Definition at line 42 of file UnicodeCharRanges.h.

Member Typedef Documentation

◆ CharRanges

Definition at line 44 of file UnicodeCharRanges.h.

Constructor & Destructor Documentation

◆ UnicodeCharSet()

llvm::sys::UnicodeCharSet::UnicodeCharSet ( CharRanges  Ranges)
inline

Constructs a UnicodeCharSet instance from an array of UnicodeCharRanges.

Array pointed by Ranges should have the lifetime at least as long as the UnicodeCharSet instance, and should not change. Array is validated by the constructor, so it makes sense to create as few UnicodeCharSet instances per each array of ranges, as possible.

Definition at line 61 of file UnicodeCharRanges.h.

References assert().

Member Function Documentation

◆ contains()

bool llvm::sys::UnicodeCharSet::contains ( uint32_t  C) const
inline

Returns true if the character set contains the Unicode code point C.

Definition at line 68 of file UnicodeCharRanges.h.

References C, llvm::dbgs(), DEBUG, E, I, and llvm::write_hex().

Referenced by llvm::sys::unicode::charWidth(), and llvm::sys::unicode::isPrintable().


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