Intel SPMD Program Compiler  1.9.1
Public Member Functions | Static Public Member Functions | Private Member Functions | List of all members
StructMemberExpr Class Reference
Inheritance diagram for StructMemberExpr:
Inheritance graph
[legend]
Collaboration diagram for StructMemberExpr:
Collaboration graph
[legend]

Public Member Functions

 StructMemberExpr (Expr *e, const char *id, SourcePos p, SourcePos idpos, bool derefLValue)
 
const TypeGetType () const
 
const TypeGetLValueType () const
 
int getElementNumber () const
 
const TypegetElementType () const
 
- Public Member Functions inherited from MemberExpr
llvm::Value * GetValue (FunctionEmitContext *ctx) const
 
llvm::Value * GetLValue (FunctionEmitContext *ctx) const
 
SymbolGetBaseSymbol () const
 
void Print () const
 
ExprOptimize ()
 
ExprTypeCheck ()
 
int EstimateCost () const
 
std::string getCandidateNearMatches () const
 
 MemberExpr (Expr *expr, const char *identifier, SourcePos pos, SourcePos identifierPos, bool derefLValue, unsigned scid)
 
- Public Member Functions inherited from Expr
 Expr (SourcePos p, unsigned scid)
 
virtual llvm::Constant * GetConstant (const Type *type) const
 
- Public Member Functions inherited from ASTNode
 ASTNode (SourcePos p, unsigned scid)
 
virtual ~ASTNode ()
 
unsigned getValueID () const
 

Static Public Member Functions

static bool classof (StructMemberExpr const *)
 
static bool classof (ASTNode const *N)
 
- Static Public Member Functions inherited from MemberExpr
static MemberExprcreate (Expr *expr, const char *identifier, SourcePos pos, SourcePos identifierPos, bool derefLvalue)
 
static bool classof (MemberExpr const *)
 
static bool classof (ASTNode const *N)
 
- Static Public Member Functions inherited from Expr
static bool classof (Expr const *)
 
static bool classof (ASTNode const *N)
 
- Static Public Member Functions inherited from ASTNode
static bool classof (ASTNode const *)
 

Private Member Functions

const StructTypegetStructType () const
 

Additional Inherited Members

- Public Types inherited from ASTNode
enum  ASTNodeTy {
  AddressOfExprID, AssignExprID, BinaryExprID, ConstExprID,
  DerefExprID, PtrDerefExprID, RefDerefExprID, ExprListID,
  FunctionCallExprID, FunctionSymbolExprID, IndexExprID, StructMemberExprID,
  VectorMemberExprID, NewExprID, NullPointerExprID, ReferenceExprID,
  SelectExprID, SizeOfExprID, SymbolExprID, SyncExprID,
  TypeCastExprID, UnaryExprID, MaxExprID, AssertStmtID,
  BreakStmtID, CaseStmtID, ContinueStmtID, DeclStmtID,
  DefaultStmtID, DeleteStmtID, DoStmtID, ExprStmtID,
  ForeachActiveStmtID, ForeachStmtID, ForeachUniqueStmtID, ForStmtID,
  GotoStmtID, IfStmtID, LabeledStmtID, PrintStmtID,
  ReturnStmtID, StmtListID, SwitchStmtID, UnmaskedStmtID
}
 
- Public Attributes inherited from MemberExpr
Exprexpr
 
std::string identifier
 
const SourcePos identifierPos
 
bool dereferenceExpr
 
- Public Attributes inherited from ASTNode
SourcePos pos
 
- Protected Attributes inherited from MemberExpr
const Typetype
 
const TypelvalueType
 

Detailed Description

Definition at line 4721 of file expr.cpp.

Constructor & Destructor Documentation

StructMemberExpr::StructMemberExpr ( Expr e,
const char *  id,
SourcePos  p,
SourcePos  idpos,
bool  derefLValue 
)

Definition at line 4742 of file expr.cpp.

Member Function Documentation

static bool StructMemberExpr::classof ( StructMemberExpr const *  )
inlinestatic

Definition at line 4727 of file expr.cpp.

static bool StructMemberExpr::classof ( ASTNode const *  N)
inlinestatic

Definition at line 4728 of file expr.cpp.

References ASTNode::getValueID(), and ASTNode::StructMemberExprID.

int StructMemberExpr::getElementNumber ( ) const
virtual
const Type * StructMemberExpr::getElementType ( ) const
virtual

Implements MemberExpr.

Definition at line 4856 of file expr.cpp.

References StructType::GetElementType(), getStructType(), and MemberExpr::identifier.

Referenced by GetLValueType().

const Type * StructMemberExpr::GetLValueType ( ) const
virtual

Returns the type of the value returned by GetLValueType(); this should be a pointer type of some sort (uniform or varying).

Reimplemented from Expr.

Definition at line 4801 of file expr.cpp.

References AssertPos, MemberExpr::dereferenceExpr, Module::errorCount, MemberExpr::expr, PointerType::GetAsFrozenSlice(), getElementType(), Expr::GetLValueType(), Expr::GetType(), PointerType::GetUniform(), PointerType::GetVarying(), Type::IsUniformType(), MemberExpr::lvalueType, and m.

Referenced by GetType().

const StructType * StructMemberExpr::getStructType ( ) const
private

Returns the type of the underlying struct that we're returning a member of.

Definition at line 4868 of file expr.cpp.

References AssertPos, MemberExpr::dereferenceExpr, MemberExpr::expr, PointerType::GetBaseType(), Expr::GetLValueType(), ReferenceType::GetReferenceTarget(), Expr::GetType(), and MemberExpr::type.

Referenced by getElementNumber(), getElementType(), and GetType().

const Type * StructMemberExpr::GetType ( ) const
virtual

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