Intel® Implicit SPMD Program Compiler (Intel® ISPC)
1.13.0
|
Representation of the declaration specifiers in a declaration. More...
#include <decl.h>
Public Member Functions | |
DeclSpecs (const Type *t=NULL, StorageClass sc=SC_NONE, int tq=TYPEQUAL_NONE) | |
void | Print () const |
const Type * | GetBaseType (SourcePos pos) const |
Public Attributes | |
StorageClass | storageClass |
int | typeQualifiers |
const Type * | baseType |
int | vectorSize |
int | soaWidth |
std::vector< std::pair< std::string, SourcePos > > | declSpecList |
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.
DeclSpecs::DeclSpecs | ( | const Type * | t = NULL , |
StorageClass | sc = SC_NONE , |
||
int | tq = TYPEQUAL_NONE |
||
) |
Definition at line 129 of file decl.cpp.
References baseType, SymbolTable::ContainsType(), Type::IsUniformType(), Type::IsVaryingType(), m, soaWidth, storageClass, Module::symbolTable, TYPEQUAL_UNIFORM, TYPEQUAL_VARYING, typeQualifiers, and vectorSize.
Definition at line 147 of file decl.cpp.
References baseType, Error(), g, StructType::GetAsSOAType(), AtomicType::GetAsUnboundVariabilityType(), Type::GetString(), Target::getVectorWidth(), Type::IsUniformType(), Type::IsVaryingType(), lApplyTypeQualifiers(), PerformanceWarning(), soaWidth, Globals::target, typeQualifiers, AtomicType::UniformInt32, vectorSize, and Warning().
Referenced by Declarator::InitFromDeclSpecs().
void DeclSpecs::Print | ( | ) | const |
Definition at line 228 of file decl.cpp.
References baseType, Type::GetString(), lGetStorageClassName(), lPrintTypeQualifiers(), soaWidth, storageClass, typeQualifiers, and vectorSize.
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 100 of file decl.h.
Referenced by DeclSpecs(), GetBaseType(), and Print().
std::vector<std::pair<std::string, SourcePos> > DeclSpecs::declSpecList |
Definition at line 114 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 112 of file decl.h.
Referenced by DeclSpecs(), GetBaseType(), GetStructTypesNamesPositions(), and Print().
StorageClass DeclSpecs::storageClass |
Definition at line 90 of file decl.h.
Referenced by DeclSpecs(), Declarator::InitFromDeclSpecs(), Declarator::InitFromType(), and Print().
int DeclSpecs::typeQualifiers |
Zero or more of the TYPEQUAL_* values, ANDed together.
Definition at line 93 of file decl.h.
Referenced by 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 107 of file decl.h.
Referenced by DeclSpecs(), GetBaseType(), and Print().