|
Intel SPMD Program Compiler
1.3.0
|
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>

Public Member Functions | |
| Declaration (DeclSpecs *ds, std::vector< Declarator * > *dlist=NULL) | |
| Declaration (DeclSpecs *ds, Declarator *d) | |
| void | Print (int indent) const |
| std::vector< VariableDeclaration > | GetVariableDeclarations () const |
| void | DeclareFunctions () |
Public Attributes | |
| DeclSpecs * | declSpecs |
| std::vector< Declarator * > | declarators |
Representation of a full declaration of one or more variables, including the shared DeclSpecs as well as the per-variable Declarators.
| Declaration::Declaration | ( | DeclSpecs * | ds, |
| std::vector< Declarator * > * | dlist = NULL |
||
| ) |
Definition at line 575 of file decl.cpp.
References declarators, declSpecs, and NULL.
| Declaration::Declaration | ( | DeclSpecs * | ds, |
| Declarator * | d | ||
| ) |
Definition at line 585 of file decl.cpp.
References declarators, declSpecs, Declarator::InitFromDeclSpecs(), and NULL.
| void Declaration::DeclareFunctions | ( | ) |
For any function declarations in the Declaration, add the declaration to the module.
Definition at line 623 of file decl.cpp.
References Module::AddFunctionDeclaration(), Assert, declarators, declSpecs, Module::errorCount, m, Declarator::name, NULL, Declarator::pos, SC_TYPEDEF, DeclSpecs::storageClass, Declarator::storageClass, Declarator::type, TYPEQUAL_INLINE, and DeclSpecs::typeQualifiers.
| 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 595 of file decl.cpp.
References SymbolTable::AddVariable(), Assert, declarators, declSpecs, Type::Equal(), Error(), Module::errorCount, Declarator::initExpr, m, Declarator::name, NULL, Declarator::pos, Type::ResolveUnboundVariability(), SC_TYPEDEF, DeclSpecs::storageClass, Declarator::storageClass, Module::symbolTable, Declarator::type, Variability::Varying, and AtomicType::Void.
| void Declaration::Print | ( | int | indent | ) | const |
Definition at line 646 of file decl.cpp.
References declarators, declSpecs, and DeclSpecs::Print().
| std::vector<Declarator *> Declaration::declarators |
Definition at line 206 of file decl.h.
Referenced by Declaration(), DeclareFunctions(), GetVariableDeclarations(), Declarator::InitFromType(), and Print().
Definition at line 205 of file decl.h.
Referenced by Declaration(), DeclareFunctions(), GetVariableDeclarations(), Declarator::InitFromType(), and Print().
1.7.5.1