clang API Documentation

Public Member Functions | Static Public Member Functions
clang::ExtVectorElementExpr Class Reference

#include <Expr.h>

Inheritance diagram for clang::ExtVectorElementExpr:
Inheritance graph
[legend]
Collaboration diagram for clang::ExtVectorElementExpr:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ExtVectorElementExpr (QualType ty, ExprValueKind VK, Expr *base, IdentifierInfo &accessor, SourceLocation loc)
 ExtVectorElementExpr (EmptyShell Empty)
 Build an empty vector element expression.
const ExprgetBase () const
ExprgetBase ()
void setBase (Expr *E)
IdentifierInfogetAccessor () 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.
SourceRange getSourceRange () const LLVM_READONLY
bool isArrow () const
child_range children ()

Static Public Member Functions

static bool classof (const Stmt *T)
static bool classof (const ExtVectorElementExpr *)

Detailed Description

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.

Definition at line 4186 of file Expr.h.


Constructor & Destructor Documentation

clang::ExtVectorElementExpr::ExtVectorElementExpr ( QualType  ty,
ExprValueKind  VK,
Expr base,
IdentifierInfo accessor,
SourceLocation  loc 
) [inline]

Definition at line 4191 of file Expr.h.

clang::ExtVectorElementExpr::ExtVectorElementExpr ( EmptyShell  Empty) [inline, explicit]

Build an empty vector element expression.

Definition at line 4201 of file Expr.h.


Member Function Documentation

child_range clang::ExtVectorElementExpr::children ( ) [inline]

Reimplemented from clang::Stmt.

Definition at line 4239 of file Expr.h.

static bool clang::ExtVectorElementExpr::classof ( const Stmt T) [inline, static]

Reimplemented from clang::Expr.

Definition at line 4233 of file Expr.h.

References clang::Stmt::getStmtClass().

static bool clang::ExtVectorElementExpr::classof ( const ExtVectorElementExpr ) [inline, static]

Definition at line 4236 of file Expr.h.

bool ExtVectorElementExpr::containsDuplicateElements ( ) const

containsDuplicateElements - Return true if any element access is repeated.

Definition at line 2679 of file Expr.cpp.

References clang::IdentifierInfo::getName().

IdentifierInfo& clang::ExtVectorElementExpr::getAccessor ( ) const [inline]

Definition at line 4208 of file Expr.h.

SourceLocation clang::ExtVectorElementExpr::getAccessorLoc ( ) const [inline]

Definition at line 4211 of file Expr.h.

const Expr* clang::ExtVectorElementExpr::getBase ( ) const [inline]
Expr* clang::ExtVectorElementExpr::getBase ( ) [inline]

Definition at line 4205 of file Expr.h.

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 2700 of file Expr.cpp.

References clang::ExtVectorType::getAccessorIdx(), clang::IdentifierInfo::getName(), getNumElements(), and Index.

Referenced by clang::CodeGen::CodeGenFunction::EmitExtVectorElementExpr().

unsigned ExtVectorElementExpr::getNumElements ( ) const

getNumElements - Get the number of components being selected.

Definition at line 2672 of file Expr.cpp.

References clang::Expr::getType().

Referenced by getEncodedElementAccess().

SourceRange clang::ExtVectorElementExpr::getSourceRange ( ) const [inline]

SourceLocation tokens are not useful in isolation - they are low level value objects created/interpreted by SourceManager. We assume AST clients will have a pointer to the respective SourceManager.

Reimplemented from clang::Stmt.

Definition at line 4225 of file Expr.h.

References getBase(), and clang::Stmt::getLocStart().

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 2668 of file Expr.cpp.

References getBase(), and clang::Expr::getType().

Referenced by clang::CodeGen::CodeGenFunction::EmitExtVectorElementExpr().

void clang::ExtVectorElementExpr::setAccessor ( IdentifierInfo II) [inline]

Definition at line 4209 of file Expr.h.

void clang::ExtVectorElementExpr::setAccessorLoc ( SourceLocation  L) [inline]

Definition at line 4212 of file Expr.h.

void clang::ExtVectorElementExpr::setBase ( Expr E) [inline]

Definition at line 4206 of file Expr.h.


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