Intel® Implicit SPMD Program Compiler (Intel® ISPC)  1.13.0
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
 
const TypeGetType () 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 std::pair< llvm::Constant *, bool > GetStorageConstant (const Type *type) const
 
virtual std::pair< llvm::Constant *, bool > 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 4484 of file expr.cpp.

Constructor & Destructor Documentation

◆ StructMemberExpr()

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

Definition at line 4500 of file expr.cpp.

Member Function Documentation

◆ classof() [1/2]

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

Definition at line 4488 of file expr.cpp.

◆ classof() [2/2]

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

◆ getElementNumber()

int StructMemberExpr::getElementNumber ( ) const
virtual

◆ getElementType()

const Type * StructMemberExpr::getElementType ( ) const
virtual

Implements MemberExpr.

Definition at line 4593 of file expr.cpp.

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

Referenced by VectorMemberExpr::classof(), and GetLValueType().

◆ 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 4548 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 VectorMemberExpr::classof(), and GetType().

◆ getStructType()

const StructType * StructMemberExpr::getStructType ( ) const
private

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

Definition at line 4603 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().

◆ GetType()

const Type * StructMemberExpr::GetType ( ) const
virtual

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