Intel® Implicit SPMD Program Compiler (Intel® ISPC)  1.13.0
Classes | Macros | Enumerations | Functions
decl.h File Reference

Declarations related to type declarations; the parser basically creates instances of these classes, which are then turned into actual Types. More...

#include "ispc.h"
#include <llvm/ADT/SmallVector.h>
Include dependency graph for decl.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  DeclSpecs
 Representation of the declaration specifiers in a declaration. More...
 
class  Declarator
 Representation of the declaration of a single variable. More...
 
class  Declaration
 Representation of a full declaration of one or more variables, including the shared DeclSpecs as well as the per-variable Declarators. More...
 
struct  StructDeclaration
 

Macros

#define TYPEQUAL_NONE   0
 
#define TYPEQUAL_CONST   (1 << 0)
 
#define TYPEQUAL_UNIFORM   (1 << 1)
 
#define TYPEQUAL_VARYING   (1 << 2)
 
#define TYPEQUAL_TASK   (1 << 3)
 
#define TYPEQUAL_SIGNED   (1 << 4)
 
#define TYPEQUAL_UNSIGNED   (1 << 5)
 
#define TYPEQUAL_INLINE   (1 << 6)
 
#define TYPEQUAL_EXPORT   (1 << 7)
 
#define TYPEQUAL_UNMASKED   (1 << 8)
 
#define TYPEQUAL_NOINLINE   (1 << 9)
 

Enumerations

enum  DeclaratorKind {
  DK_BASE, DK_POINTER, DK_REFERENCE, DK_ARRAY,
  DK_FUNCTION
}
 

Functions

void GetStructTypesNamesPositions (const std::vector< StructDeclaration *> &sd, llvm::SmallVector< const Type *, 8 > *elementTypes, llvm::SmallVector< std::string, 8 > *elementNames, llvm::SmallVector< SourcePos, 8 > *elementPositions)
 

Detailed Description

Declarations related to type declarations; the parser basically creates instances of these classes, which are then turned into actual Types.

Three classes work together to represent declarations. As an example, consider a declaration like:

static uniform int foo, bar[10];

An instance of the Declaration class represents this entire declaration of two variables, 'foo' and 'bar'. It holds a single instance of the DeclSpecs class represents the common specifiers for all of the variables–here, that the declaration has the 'static' and 'uniform' qualifiers, and that it's basic type is 'int'. Then for each variable declaration, the Declaraiton class holds an instance of a Declarator, which in turn records the per-variable information like the name, array size (if any), initializer expression, etc.

Definition in file decl.h.

Macro Definition Documentation

◆ TYPEQUAL_CONST

#define TYPEQUAL_CONST   (1 << 0)

Definition at line 68 of file decl.h.

Referenced by Declarator::InitFromType(), lApplyTypeQualifiers(), and lPrintTypeQualifiers().

◆ TYPEQUAL_EXPORT

#define TYPEQUAL_EXPORT   (1 << 7)

Definition at line 75 of file decl.h.

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

◆ TYPEQUAL_INLINE

#define TYPEQUAL_INLINE   (1 << 6)

Definition at line 74 of file decl.h.

Referenced by Declaration::DeclareFunctions(), and lPrintTypeQualifiers().

◆ TYPEQUAL_NOINLINE

#define TYPEQUAL_NOINLINE   (1 << 9)

Definition at line 77 of file decl.h.

Referenced by Declaration::DeclareFunctions().

◆ TYPEQUAL_NONE

#define TYPEQUAL_NONE   0

Definition at line 67 of file decl.h.

◆ TYPEQUAL_SIGNED

#define TYPEQUAL_SIGNED   (1 << 4)

Definition at line 72 of file decl.h.

Referenced by lApplyTypeQualifiers(), and lPrintTypeQualifiers().

◆ TYPEQUAL_TASK

#define TYPEQUAL_TASK   (1 << 3)

Definition at line 71 of file decl.h.

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

◆ TYPEQUAL_UNIFORM

#define TYPEQUAL_UNIFORM   (1 << 1)

◆ TYPEQUAL_UNMASKED

#define TYPEQUAL_UNMASKED   (1 << 8)

Definition at line 76 of file decl.h.

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

◆ TYPEQUAL_UNSIGNED

#define TYPEQUAL_UNSIGNED   (1 << 5)

Definition at line 73 of file decl.h.

Referenced by lApplyTypeQualifiers(), and lPrintTypeQualifiers().

◆ TYPEQUAL_VARYING

#define TYPEQUAL_VARYING   (1 << 2)

Enumeration Type Documentation

◆ DeclaratorKind

Enumerator
DK_BASE 
DK_POINTER 
DK_REFERENCE 
DK_ARRAY 
DK_FUNCTION 

Definition at line 117 of file decl.h.

Function Documentation

◆ GetStructTypesNamesPositions()

void GetStructTypesNamesPositions ( const std::vector< StructDeclaration *> &  sd,
llvm::SmallVector< const Type *, 8 > *  elementTypes,
llvm::SmallVector< std::string, 8 > *  elementNames,
llvm::SmallVector< SourcePos, 8 > *  elementPositions 
)