Intel SPMD Program Compiler  1.9.1
Public Member Functions | Public Attributes | List of all members
DeclSpecs Class Reference

Representation of the declaration specifiers in a declaration. More...

#include <decl.h>

Collaboration diagram for DeclSpecs:
Collaboration graph
[legend]

Public Member Functions

 DeclSpecs (const Type *t=NULL, StorageClass sc=SC_NONE, int tq=TYPEQUAL_NONE)
 
void Print () const
 
const TypeGetBaseType (SourcePos pos) const
 

Public Attributes

StorageClass storageClass
 
int typeQualifiers
 
const TypebaseType
 
int vectorSize
 
int soaWidth
 
std::vector< std::pair< std::string, SourcePos > > declSpecList
 

Detailed Description

Representation of the declaration specifiers in a declaration.

In other words, this represents all of the stuff that applies to all of the (possibly multiple) variables in a declaration.

Definition at line 84 of file decl.h.

Constructor & Destructor Documentation

DeclSpecs::DeclSpecs ( const Type t = NULL,
StorageClass  sc = SC_NONE,
int  tq = TYPEQUAL_NONE 
)

Member Function Documentation

const Type * DeclSpecs::GetBaseType ( SourcePos  pos) const
void DeclSpecs::Print ( ) const

Member Data Documentation

const Type* DeclSpecs::baseType

The basic type provided in the declaration; this should be an AtomicType, EnumType, StructType, or VectorType; other types (like ArrayTypes) will end up being created if a particular declaration has an array size, etc.

Definition at line 101 of file decl.h.

Referenced by DeclSpecs(), GetBaseType(), and Print().

std::vector<std::pair<std::string, SourcePos> > DeclSpecs::declSpecList

Definition at line 115 of file decl.h.

Referenced by Declarator::InitFromDeclSpecs(), and Declarator::InitFromType().

int DeclSpecs::soaWidth

If this is a declaration with an "soa<n>" qualifier, this gives the SOA width specified. Otherwise this is zero.

Definition at line 113 of file decl.h.

Referenced by DeclSpecs(), GetBaseType(), GetStructTypesNamesPositions(), and Print().

StorageClass DeclSpecs::storageClass
int DeclSpecs::typeQualifiers

Zero or more of the TYPEQUAL_* values, ANDed together.

Definition at line 94 of file decl.h.

Referenced by Declaration::DeclareFunctions(), DeclSpecs(), GetBaseType(), GetStructTypesNamesPositions(), Declarator::InitFromType(), and Print().

int DeclSpecs::vectorSize

If this is a declaration with a vector type, this gives the vector width. For non-vector types, this is zero.

Definition at line 108 of file decl.h.

Referenced by DeclSpecs(), GetBaseType(), and Print().


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