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.
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)

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 4468 of file Expr.h.


Constructor & Destructor Documentation

Definition at line 4473 of file Expr.h.

Build an empty vector element expression.

Definition at line 4483 of file Expr.h.


Member Function Documentation

Reimplemented from clang::Stmt.

Definition at line 4521 of file Expr.h.

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().

Definition at line 4490 of file Expr.h.

Definition at line 4493 of file Expr.h.

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

Definition at line 4487 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 3383 of file Expr.cpp.

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

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

Reimplemented from clang::Stmt.

Definition at line 4510 of file Expr.h.

Reimplemented from clang::Stmt.

Definition at line 4507 of file Expr.h.

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

getNumElements - Get the number of components being selected.

Definition at line 3355 of file Expr.cpp.

References clang::Expr::getType().

Referenced by getEncodedElementAccess().

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().

Definition at line 4491 of file Expr.h.

Definition at line 4494 of file Expr.h.

Definition at line 4488 of file Expr.h.


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