clang API Documentation

Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends
clang::VectorType Class Reference

#include <Type.h>

Inheritance diagram for clang::VectorType:
Inheritance graph
[legend]
Collaboration diagram for clang::VectorType:
Collaboration graph
[legend]

List of all members.

Public Types

enum  VectorKind {
  GenericVector, AltiVecVector, AltiVecPixel, AltiVecBool,
  NeonVector, NeonPolyVector
}

Public Member Functions

QualType getElementType () const
unsigned getNumElements () const
bool isSugared () const
QualType desugar () const
VectorKind getVectorKind () const
void Profile (llvm::FoldingSetNodeID &ID)

Static Public Member Functions

static bool isVectorSizeTooLarge (unsigned NumElements)
static void Profile (llvm::FoldingSetNodeID &ID, QualType ElementType, unsigned NumElements, TypeClass TypeClass, VectorKind VecKind)
static bool classof (const Type *T)

Protected Member Functions

 VectorType (QualType vecType, unsigned nElements, QualType canonType, VectorKind vecKind)
 VectorType (TypeClass tc, QualType vecType, unsigned nElements, QualType canonType, VectorKind vecKind)

Protected Attributes

QualType ElementType
 ElementType - The element type of the vector.

Friends

class ASTContext

Detailed Description

VectorType - GCC generic vector type. This type is created using __attribute__((vector_size(n)), where "n" specifies the vector size in bytes; or from an Altivec __vector or vector declaration. Since the constructor takes the number of vector elements, the client is responsible for converting the size into the number of elements.

Definition at line 2533 of file Type.h.


Member Enumeration Documentation

Enumerator:
GenericVector 
AltiVecVector 
AltiVecPixel 
AltiVecBool 
NeonVector 
NeonPolyVector 

Definition at line 2535 of file Type.h.


Constructor & Destructor Documentation

VectorType::VectorType ( QualType  vecType,
unsigned  nElements,
QualType  canonType,
VectorKind  vecKind 
) [protected]

Definition at line 171 of file Type.cpp.

References clang::Type::VectorTypeBits.

VectorType::VectorType ( TypeClass  tc,
QualType  vecType,
unsigned  nElements,
QualType  canonType,
VectorKind  vecKind 
) [protected]

Definition at line 183 of file Type.cpp.

References clang::Type::VectorTypeBits.


Member Function Documentation

static bool clang::VectorType::classof ( const Type T) [inline, static]

Reimplemented in clang::ExtVectorType.

Definition at line 2583 of file Type.h.

References clang::Type::getTypeClass().

Reimplemented in clang::ExtVectorType.

Definition at line 2564 of file Type.h.

bool clang::VectorType::isSugared ( ) const [inline]

Reimplemented in clang::ExtVectorType.

Definition at line 2563 of file Type.h.

static bool clang::VectorType::isVectorSizeTooLarge ( unsigned  NumElements) [inline, static]

Definition at line 2559 of file Type.h.

Referenced by clang::Sema::BuildExtVectorType(), and HandleVectorSizeAttr().

void clang::VectorType::Profile ( llvm::FoldingSetNodeID &  ID) [inline]

Definition at line 2570 of file Type.h.

References getElementType().

Referenced by clang::ASTContext::getExtVectorType(), and clang::ASTContext::getVectorType().

static void clang::VectorType::Profile ( llvm::FoldingSetNodeID &  ID,
QualType  ElementType,
unsigned  NumElements,
TypeClass  TypeClass,
VectorKind  VecKind 
) [inline, static]

Definition at line 2574 of file Type.h.

References clang::QualType::getAsOpaquePtr().


Friends And Related Function Documentation

friend class ASTContext [friend]

Reimplemented from clang::Type.

Reimplemented in clang::ExtVectorType.

Definition at line 2553 of file Type.h.


Member Data Documentation

ElementType - The element type of the vector.

Definition at line 2545 of file Type.h.


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