#include <AggExpr.h>
Public Member Functions | |
Location | getLocation () const |
Returns the location of this ComponentKey. | |
void | setLocation (Location loc) |
Sets the location of this ComponentKey. | |
bool | isStatic () const |
Returns true if this ComponentKey is static. | |
Constructors. | |
ComponentKey (Expr *node) | |
ComponentKey (Identifier *node) | |
ComponentKey (Range *node) | |
ComponentKey (TypeRef *node) | |
ComponentKey (ComponentDecl *node, Location loc) | |
Representation Predicates. | |
bool | denotesExpr () const |
Returns true if this node denotes a expression. | |
bool | denotesIdentifier () const |
bool | denotesRange () const |
bool | denotesType () const |
Returns true if this node denotes a Type. | |
bool | denotesComponent () const |
Representation Getters. | |
Expr * | getAsExpr () |
Identifier * | getAsIdentifier () |
Range * | getAsRange () |
TypeRef * | getAsTypeRef () |
DiscreteType * | getAsDiscreteType () |
ComponentDecl * | getAsComponent () |
const Expr * | getAsExpr () const |
const Identifier * | getAsIdentifier () const |
const Range * | getAsRange () const |
const TypeRef * | getAsTypeRef () const |
const DiscreteType * | getAsDiscreteType () const |
const ComponentDecl * | getAsComponent () const |
Ast *& | getRep () |
Returns the underlying node as a raw Ast. | |
const Ast * | getRep () const |
Representation Setters. | |
void | setKey (Expr *node) |
void | setKey (Range *node) |
void | setKey (TypeRef *node) |
void | setKey (Identifier *node) |
void | setKey (ComponentDecl *node) |
Bounds Extractors. | |
Returns the lower and upper bounds associated with this ComponentKey.
| |
Expr * | getLowerExpr () |
Expr * | getUpperExpr () |
void | getLowerValue (llvm::APInt &value) const |
void | getUpperValue (llvm::APInt &value) const |
Static Public Member Functions | |
static bool | classof (const ComponentKey *node) |
Support isa and dyn_cast. | |
static bool | classof (const Ast *node) |
Comparison Predicates. | |
| |
bool | isComparable () const |
Returns true if this ComponentKey is comparable. | |
static bool | compareKeysU (const ComponentKey *X, const ComponentKey *Y) |
Provides an ordering relation between two ComponentKey's for which isComparable is true. | |
static bool | compareKeysS (const ComponentKey *X, const ComponentKey *Y) |
Provides an ordering relation between two ComponentKey's for which isComparable is true. |
Definition at line 94 of file AggExpr.h.
comma::ComponentKey::ComponentKey | ( | Identifier * | node | ) | [inline] |
comma::ComponentKey::ComponentKey | ( | Range * | node | ) | [inline] |
comma::ComponentKey::ComponentKey | ( | TypeRef * | node | ) | [inline] |
comma::ComponentKey::ComponentKey | ( | ComponentDecl * | node, | |
Location | loc | |||
) | [inline] |
static bool comma::ComponentKey::classof | ( | const Ast * | node | ) | [inline, static] |
static bool comma::ComponentKey::classof | ( | const ComponentKey * | node | ) | [inline, static] |
bool ComponentKey::compareKeysS | ( | const ComponentKey * | X, | |
const ComponentKey * | Y | |||
) | [static] |
Provides an ordering relation between two ComponentKey's for which isComparable is true.
Predicate defining a less-than relation between keys of signed type. For use with std::stort.
Definition at line 81 of file AggExpr.cpp.
bool ComponentKey::compareKeysU | ( | const ComponentKey * | X, | |
const ComponentKey * | Y | |||
) | [static] |
Provides an ordering relation between two ComponentKey's for which isComparable is true.
Predicate defining a less-than relation between component keys of unsigned type. For use with std::stort.
Definition at line 70 of file AggExpr.cpp.
bool comma::ComponentKey::denotesComponent | ( | ) | const [inline] |
bool comma::ComponentKey::denotesExpr | ( | ) | const [inline] |
Returns true if this node denotes a expression.
Reimplemented from comma::Ast.
bool comma::ComponentKey::denotesIdentifier | ( | ) | const [inline] |
bool comma::ComponentKey::denotesType | ( | ) | const [inline] |
Returns true if this node denotes a Type.
Reimplemented from comma::Ast.
const ComponentDecl* comma::ComponentKey::getAsComponent | ( | ) | const [inline] |
ComponentDecl* comma::ComponentKey::getAsComponent | ( | ) | [inline] |
const DiscreteType* comma::ComponentKey::getAsDiscreteType | ( | ) | const [inline] |
DiscreteType* comma::ComponentKey::getAsDiscreteType | ( | ) | [inline] |
const Expr* comma::ComponentKey::getAsExpr | ( | ) | const [inline] |
Expr* comma::ComponentKey::getAsExpr | ( | ) | [inline] |
const Identifier* comma::ComponentKey::getAsIdentifier | ( | ) | const [inline] |
Identifier* comma::ComponentKey::getAsIdentifier | ( | ) | [inline] |
const Range* comma::ComponentKey::getAsRange | ( | ) | const [inline] |
Range* comma::ComponentKey::getAsRange | ( | ) | [inline] |
const TypeRef* comma::ComponentKey::getAsTypeRef | ( | ) | const [inline] |
TypeRef* comma::ComponentKey::getAsTypeRef | ( | ) | [inline] |
Location comma::ComponentKey::getLocation | ( | ) | const [inline, virtual] |
Returns the location of this ComponentKey.
Reimplemented from comma::Ast.
Expr * ComponentKey::getLowerExpr | ( | ) |
Definition at line 38 of file AggExpr.cpp.
void ComponentKey::getLowerValue | ( | llvm::APInt & | value | ) | const |
Definition at line 54 of file AggExpr.cpp.
const Ast* comma::ComponentKey::getRep | ( | ) | const [inline] |
Ast*& comma::ComponentKey::getRep | ( | ) | [inline] |
Expr * ComponentKey::getUpperExpr | ( | ) |
Definition at line 46 of file AggExpr.cpp.
void ComponentKey::getUpperValue | ( | llvm::APInt & | value | ) | const |
Definition at line 62 of file AggExpr.cpp.
bool comma::ComponentKey::isComparable | ( | ) | const [inline] |
Returns true if this ComponentKey is comparable.
ComponentKeys are comparable if the underlying representation is a static expression, range, discrete subtype indication. ComponentKeys represented as Identifiers are not considered to be comparable.
bool ComponentKey::isStatic | ( | ) | const |
Returns true if this ComponentKey is static.
A ComponentKey is considered to be static when it is represented by a static expression, range, or discrete type. Identifiers are always considered to be static.
Definition at line 19 of file AggExpr.cpp.
void comma::ComponentKey::setKey | ( | ComponentDecl * | node | ) | [inline] |
void comma::ComponentKey::setKey | ( | Identifier * | node | ) | [inline] |
void comma::ComponentKey::setKey | ( | TypeRef * | node | ) | [inline] |
void comma::ComponentKey::setKey | ( | Range * | node | ) | [inline] |
void comma::ComponentKey::setLocation | ( | Location | loc | ) | [inline] |
Sets the location of this ComponentKey.