LLVM API Documentation

llvm::StructType Class Reference

#include <DerivedTypes.h>

Inheritance diagram for llvm::StructType:
[legend]
Collaboration diagram for llvm::StructType:
[legend]

List of all members.

Public Types

typedef Type::subtype_iterator element_iterator

Public Member Functions

element_iterator element_begin () const
element_iterator element_end () const
unsigned getNumElements () const
const Type * getElementType (unsigned N) const
virtual const Type * getTypeAtIndex (const Value *V) const
virtual const Type * getTypeAtIndex (unsigned Idx) const
virtual bool indexValid (const Value *V) const
virtual bool indexValid (unsigned Idx) const
virtual void refineAbstractType (const DerivedType *OldTy, const Type *NewTy)
virtual void typeBecameConcrete (const DerivedType *AbsTy)
bool isPacked () const

Static Public Member Functions

static StructType * get (const std::vector< const Type * > &Params, bool isPacked=false)
static StructType * get (const Type *type,...) END_WITH_NULL
static bool classof (const StructType *)
static bool classof (const Type *T)
 Methods for support type inquiry through isa, cast, and dyn_cast:.

Friends

class TypeMap< StructValType, StructType >


Detailed Description

StructType - Class to represent struct types

Definition at line 217 of file DerivedTypes.h.


Member Typedef Documentation

Definition at line 236 of file DerivedTypes.h.


Member Function Documentation

StructType * StructType::get ( const std::vector< const Type * > &  Params,
bool  isPacked = false 
) [static]

StructType::get - This static method is the primary way to create a StructType.

Definition at line 1247 of file Type.cpp.

References DOUT.

Referenced by llvm::DIFactory::DIFactory(), get(), llvm::ConstantStruct::get(), llvm::ProgramInfo::getSourceFiles(), and llvm::ProgramInfo::getSourceFunctions().

StructType * StructType::get ( const Type *  type,
  ... 
) [static]

StructType::get - This static method is a convenience method for creating structure types by specifying the elements as arguments. Note that this method always returns a non-packed struct. To get an empty struct, pass NULL, NULL.

Definition at line 1265 of file Type.cpp.

References get().

element_iterator llvm::StructType::element_begin (  )  const [inline]

element_iterator llvm::StructType::element_end (  )  const [inline]

unsigned llvm::StructType::getNumElements (  )  const [inline]

const Type* llvm::StructType::getElementType ( unsigned  N  )  const [inline]

const Type * StructType::getTypeAtIndex ( const Value *  V  )  const [virtual]

getTypeAtIndex - Given an index value into the type, return the type of the element. For a structure type, this must be a constant value...

Implements llvm::CompositeType.

Definition at line 395 of file Type.cpp.

References Idx.

const Type * StructType::getTypeAtIndex ( unsigned  Idx  )  const [virtual]

Implements llvm::CompositeType.

Definition at line 400 of file Type.cpp.

References llvm::Type::ContainedTys, and indexValid().

bool StructType::indexValid ( const Value *  V  )  const [virtual]

Implements llvm::CompositeType.

Definition at line 380 of file Type.cpp.

References llvm::Value::getType(), and llvm::Type::Int32Ty.

Referenced by getTypeAtIndex().

bool StructType::indexValid ( unsigned  Idx  )  const [virtual]

Implements llvm::CompositeType.

Definition at line 388 of file Type.cpp.

References llvm::Type::NumContainedTys.

void StructType::refineAbstractType ( const DerivedType *  OldTy,
const Type *  NewTy 
) [virtual]

refineAbstractType - The callback method invoked when an abstract type is resolved to another type. An object must override this method to update its internal state to reference NewType instead of OldType.

Reimplemented from llvm::Type.

Definition at line 1495 of file Type.cpp.

void StructType::typeBecameConcrete ( const DerivedType *  AbsTy  )  [virtual]

The other case which AbstractTypeUsers must be aware of is when a type makes the transition from being abstract (where it has clients on it's AbstractTypeUsers list) to concrete (where it does not). This method notifies ATU's when this occurs for a type.

Reimplemented from llvm::Type.

Definition at line 1500 of file Type.cpp.

static bool llvm::StructType::classof ( const StructType *   )  [inline, static]

Definition at line 260 of file DerivedTypes.h.

static bool llvm::StructType::classof ( const Type *   )  [inline, static]

Methods for support type inquiry through isa, cast, and dyn_cast:.

Reimplemented from llvm::CompositeType.

Definition at line 261 of file DerivedTypes.h.

References llvm::Type::getTypeID(), and llvm::Type::StructTyID.

bool llvm::StructType::isPacked (  )  const [inline]


Friends And Related Function Documentation

friend class TypeMap< StructValType, StructType > [friend]

Definition at line 218 of file DerivedTypes.h.


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