#include <Expr.h>
Public Member Functions | |
StringLiteral (const char *string, unsigned len, Location loc) | |
StringLiteral (const char *start, const char *end, Location loc) | |
Constructs a string literal using a pair of iterators. | |
ArrayType * | getType () const |
Returns the type of this string literal once resolved. | |
llvm::StringRef | getString () const |
Returns the underlying representation of this string literal. | |
unsigned | length () const |
Returns the length in characters of this string literal. | |
bool | addComponentType (EnumerationDecl *decl) |
template<class I > | |
void | addComponentTypes (I start, I end) |
Adds a set of interpretations for the component type of this string. | |
bool | removeComponentType (EnumerationDecl *decl) |
unsigned | numComponentTypes () const |
Returns the number of component interpretations. | |
bool | zeroComponentTypes () const |
Returns true if the set of component types is empty. | |
const EnumerationDecl * | getComponentType () const |
If there is a unique component type, return it, else null. | |
Static Public Member Functions | |
static bool | classof (const StringLiteral *node) |
Support isa and dyn_cast. | |
static bool | classof (const Ast *node) |
| |
typedef InterpSet::iterator | component_iterator |
Iterators over the set of component types. | |
typedef InterpSet::const_iterator | const_component_iterator |
Iterators over the set of component types. | |
bool | containsComponentType (EnumerationDecl *decl) const |
bool | containsComponentType (EnumerationType *type) const |
Iterators over the set of component types. | |
bool | resolveComponentType (EnumerationType *type) |
component_iterator | begin_component_types () |
Iterators over the set of component types. | |
component_iterator | end_component_types () |
Iterators over the set of component types. | |
const_component_iterator | begin_component_types () const |
Iterators over the set of component types. | |
const_component_iterator | end_component_types () const |
Iterators over the set of component types. |
Definition at line 496 of file Expr.h.
typedef InterpSet::iterator comma::StringLiteral::component_iterator |
typedef InterpSet::const_iterator comma::StringLiteral::const_component_iterator |
comma::StringLiteral::StringLiteral | ( | const char * | string, | |
unsigned | len, | |||
Location | loc | |||
) | [inline] |
comma::StringLiteral::StringLiteral | ( | const char * | start, | |
const char * | end, | |||
Location | loc | |||
) | [inline] |
bool comma::StringLiteral::addComponentType | ( | EnumerationDecl * | decl | ) | [inline] |
void comma::StringLiteral::addComponentTypes | ( | I | start, | |
I | end | |||
) | [inline] |
const_component_iterator comma::StringLiteral::begin_component_types | ( | ) | const [inline] |
component_iterator comma::StringLiteral::begin_component_types | ( | ) | [inline] |
static bool comma::StringLiteral::classof | ( | const Ast * | node | ) | [inline, static] |
Reimplemented from comma::Expr.
static bool comma::StringLiteral::classof | ( | const StringLiteral * | node | ) | [inline, static] |
bool comma::StringLiteral::containsComponentType | ( | EnumerationType * | type | ) | const [inline] |
bool comma::StringLiteral::containsComponentType | ( | EnumerationDecl * | decl | ) | const [inline] |
const_component_iterator comma::StringLiteral::end_component_types | ( | ) | const [inline] |
component_iterator comma::StringLiteral::end_component_types | ( | ) | [inline] |
const EnumerationDecl* comma::StringLiteral::getComponentType | ( | ) | const [inline] |
llvm::StringRef comma::StringLiteral::getString | ( | ) | const [inline] |
ArrayType* comma::StringLiteral::getType | ( | ) | const [inline] |
Returns the type of this string literal once resolved.
Reimplemented from comma::Expr.
unsigned comma::StringLiteral::length | ( | ) | const [inline] |
unsigned comma::StringLiteral::numComponentTypes | ( | ) | const [inline] |
bool comma::StringLiteral::removeComponentType | ( | EnumerationDecl * | decl | ) | [inline] |
bool StringLiteral::resolveComponentType | ( | EnumerationType * | type | ) |
bool comma::StringLiteral::zeroComponentTypes | ( | ) | const [inline] |