Intel SPMD Program Compiler  1.3.0
Classes | Enumerations | Functions
type.h File Reference

File with declarations for classes related to type representation. More...

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

Go to the source code of this file.

Classes

struct  Variability
class  Type
 Interface class that defines the type abstraction. More...
class  AtomicType
 AtomicType represents basic types like floats, ints, etc. More...
class  EnumType
 Type implementation for enumerated types. More...
class  PointerType
 Type implementation for pointers to other types. More...
class  CollectionType
 Abstract base class for types that represent collections of other types. More...
class  SequentialType
 Abstract base class for types that represent sequences. More...
class  ArrayType
 One-dimensional array type. More...
class  VectorType
 A (short) vector of atomic types. More...
class  StructType
 Representation of a structure holding a number of members. More...
class  UndefinedStructType
class  ReferenceType
 Type representing a reference to another (non-reference) type. More...
class  FunctionType
 Type representing a function (return type + argument types) More...

Enumerations

enum  TypeId {
  ATOMIC_TYPE, ENUM_TYPE, POINTER_TYPE, ARRAY_TYPE,
  VECTOR_TYPE, STRUCT_TYPE, UNDEFINED_STRUCT_TYPE, REFERENCE_TYPE,
  FUNCTION_TYPE
}

Functions

template<typename T >
const T * CastType (const Type *type)
template<>
const AtomicTypeCastType (const Type *type)
bool IsReferenceType (const Type *t)

Detailed Description

File with declarations for classes related to type representation.

Definition in file type.h.


Enumeration Type Documentation

enum TypeId

Enumerant that records each of the types that inherit from the Type baseclass.

Enumerator:
ATOMIC_TYPE 
ENUM_TYPE 
POINTER_TYPE 
ARRAY_TYPE 
VECTOR_TYPE 
STRUCT_TYPE 
UNDEFINED_STRUCT_TYPE 
REFERENCE_TYPE 
FUNCTION_TYPE 

Definition at line 78 of file type.h.


Function Documentation

template<typename T >
const T* CastType ( const Type type) [inline]

Definition at line 935 of file type.h.

References NULL.

template<>
const FunctionType * CastType ( const Type type) [inline]

Definition at line 945 of file type.h.

References ATOMIC_TYPE, NULL, and Type::typeId.

bool IsReferenceType ( const Type t) [inline]

Definition at line 1040 of file type.h.

References NULL.

Referenced by DeclStmt::EmitCode(), and ReturnStmt::EmitCode().