Intel® Implicit SPMD Program Compiler (Intel® ISPC)  1.13.0
Public Member Functions | Public Attributes | List of all members
Declaration Class Reference

Representation of a full declaration of one or more variables, including the shared DeclSpecs as well as the per-variable Declarators. More...

#include <decl.h>

Collaboration diagram for Declaration:
Collaboration graph
[legend]

Public Member Functions

 Declaration (DeclSpecs *ds, std::vector< Declarator *> *dlist=NULL)
 
 Declaration (DeclSpecs *ds, Declarator *d)
 
void Print (int indent) const
 
std::vector< VariableDeclarationGetVariableDeclarations () const
 
void DeclareFunctions ()
 

Public Attributes

DeclSpecsdeclSpecs
 
std::vector< Declarator * > declarators
 

Detailed Description

Representation of a full declaration of one or more variables, including the shared DeclSpecs as well as the per-variable Declarators.

Definition at line 178 of file decl.h.

Constructor & Destructor Documentation

◆ Declaration() [1/2]

Declaration::Declaration ( DeclSpecs ds,
std::vector< Declarator *> *  dlist = NULL 
)

Definition at line 596 of file decl.cpp.

◆ Declaration() [2/2]

Declaration::Declaration ( DeclSpecs ds,
Declarator d 
)

Definition at line 605 of file decl.cpp.

References Declarator::InitFromDeclSpecs().

Member Function Documentation

◆ DeclareFunctions()

void Declaration::DeclareFunctions ( )

For any function declarations in the Declaration, add the declaration to the module.

Definition at line 638 of file decl.cpp.

References Module::AddFunctionDeclaration(), Assert, Module::errorCount, m, Declarator::name, Declarator::pos, SC_TYPEDEF, Declarator::storageClass, Declarator::type, TYPEQUAL_INLINE, and TYPEQUAL_NOINLINE.

◆ GetVariableDeclarations()

std::vector< VariableDeclaration > Declaration::GetVariableDeclarations ( ) const

This method walks through all of the Declarators in a declaration and returns a fully-initialized Symbol and (possibly) and initialization expression for each one. (This allows the rest of the system to not have to worry about the mess of the general Declarator representation.)

Definition at line 613 of file decl.cpp.

References SymbolTable::AddVariable(), Assert, Error(), Module::errorCount, Declarator::initExpr, Type::IsVoidType(), m, Declarator::name, Declarator::pos, Type::ResolveUnboundVariability(), SC_TYPEDEF, Declarator::storageClass, Module::symbolTable, Declarator::type, and Variability::Varying.

◆ Print()

void Declaration::Print ( int  indent) const

Definition at line 659 of file decl.cpp.

References Declarator::Print().

Member Data Documentation

◆ declarators

std::vector<Declarator *> Declaration::declarators

Definition at line 197 of file decl.h.

Referenced by Declarator::InitFromType().

◆ declSpecs

DeclSpecs* Declaration::declSpecs

Definition at line 196 of file decl.h.

Referenced by Declarator::InitFromType().


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