clang API Documentation
#include <Expr.h>
Public Member Functions | |
ExtVectorElementExpr (QualType ty, ExprValueKind VK, Expr *base, IdentifierInfo &accessor, SourceLocation loc) | |
ExtVectorElementExpr (EmptyShell Empty) | |
Build an empty vector element expression. | |
const Expr * | getBase () const |
Expr * | getBase () |
void | setBase (Expr *E) |
IdentifierInfo & | getAccessor () const |
void | setAccessor (IdentifierInfo *II) |
SourceLocation | getAccessorLoc () const |
void | setAccessorLoc (SourceLocation L) |
unsigned | getNumElements () const |
getNumElements - Get the number of components being selected. | |
bool | containsDuplicateElements () const |
void | getEncodedElementAccess (SmallVectorImpl< unsigned > &Elts) const |
getEncodedElementAccess - We encode the fields as a llvm ConstantArray. | |
SourceLocation | getLocStart () const LLVM_READONLY |
SourceLocation | getLocEnd () const LLVM_READONLY |
bool | isArrow () const |
child_range | children () |
Static Public Member Functions | |
static bool | classof (const Stmt *T) |
ExtVectorElementExpr - This represents access to specific elements of a vector, and may occur on the left hand side or right hand side. For example the following is legal: "V.xy = V.zw" if V is a 4 element extended vector.
Note that the base may have either vector or pointer to vector type, just like a struct field reference.
clang::ExtVectorElementExpr::ExtVectorElementExpr | ( | QualType | ty, |
ExprValueKind | VK, | ||
Expr * | base, | ||
IdentifierInfo & | accessor, | ||
SourceLocation | loc | ||
) | [inline] |
clang::ExtVectorElementExpr::ExtVectorElementExpr | ( | EmptyShell | Empty | ) | [inline, explicit] |
child_range clang::ExtVectorElementExpr::children | ( | ) | [inline] |
Reimplemented from clang::Stmt.
static bool clang::ExtVectorElementExpr::classof | ( | const Stmt * | T | ) | [inline, static] |
Reimplemented from clang::Expr.
Definition at line 4516 of file Expr.h.
References clang::Stmt::getStmtClass().
containsDuplicateElements - Return true if any element access is repeated.
Definition at line 3362 of file Expr.cpp.
References clang::IdentifierInfo::getName().
IdentifierInfo& clang::ExtVectorElementExpr::getAccessor | ( | ) | const [inline] |
SourceLocation clang::ExtVectorElementExpr::getAccessorLoc | ( | ) | const [inline] |
const Expr* clang::ExtVectorElementExpr::getBase | ( | ) | const [inline] |
Definition at line 4486 of file Expr.h.
Referenced by clang::CodeGen::CodeGenFunction::EmitExtVectorElementExpr(), getLocStart(), and isArrow().
Expr* clang::ExtVectorElementExpr::getBase | ( | ) | [inline] |
void ExtVectorElementExpr::getEncodedElementAccess | ( | SmallVectorImpl< unsigned > & | Elts | ) | const |
getEncodedElementAccess - We encode the fields as a llvm ConstantArray.
getEncodedElementAccess - Encode the elements accessed into an llvm aggregate Constant of ConstantInt(s).
Definition at line 3383 of file Expr.cpp.
References clang::ExtVectorType::getAccessorIdx(), clang::IdentifierInfo::getName(), and getNumElements().
Referenced by clang::CodeGen::CodeGenFunction::EmitExtVectorElementExpr().
SourceLocation clang::ExtVectorElementExpr::getLocEnd | ( | ) | const [inline] |
Reimplemented from clang::Stmt.
SourceLocation clang::ExtVectorElementExpr::getLocStart | ( | ) | const [inline] |
Reimplemented from clang::Stmt.
Definition at line 4507 of file Expr.h.
References getBase(), and clang::Stmt::getLocStart().
unsigned ExtVectorElementExpr::getNumElements | ( | ) | const |
getNumElements - Get the number of components being selected.
Definition at line 3355 of file Expr.cpp.
References clang::Expr::getType().
Referenced by getEncodedElementAccess().
bool ExtVectorElementExpr::isArrow | ( | ) | const |
isArrow - Return true if the base expression is a pointer to vector, return false if the base expression is a vector.
Definition at line 3351 of file Expr.cpp.
References getBase(), clang::Expr::getType(), and clang::Type::isPointerType().
Referenced by clang::CodeGen::CodeGenFunction::EmitExtVectorElementExpr().
void clang::ExtVectorElementExpr::setAccessor | ( | IdentifierInfo * | II | ) | [inline] |
void clang::ExtVectorElementExpr::setAccessorLoc | ( | SourceLocation | L | ) | [inline] |
void clang::ExtVectorElementExpr::setBase | ( | Expr * | E | ) | [inline] |