LLVM API Documentation
#include <DerivedTypes.h>
Inheritance diagram for llvm::StructType:
Public Types | |
typedef std::vector< PATypeHandle >::const_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 bool | indexValid (const Value *V) const |
virtual void | refineAbstractType (const DerivedType *OldTy, const Type *NewTy) |
virtual void | typeBecameConcrete (const DerivedType *AbsTy) |
Static Public Member Functions | |
static StructType * | get (const std::vector< const Type * > &Params) |
static bool | classof (const StructType *T) |
static bool | classof (const Type *T) |
Methods for support type inquiry through isa, cast, and dyn_cast:. | |
Protected Member Functions | |
StructType (const std::vector< const Type * > &Types) | |
Friends | |
class | TypeMap< StructValType, StructType > |
Definition at line 154 of file DerivedTypes.h.
typedef std::vector<PATypeHandle>::const_iterator llvm::StructType::element_iterator |
Definition at line 175 of file DerivedTypes.h.
StructType::StructType | ( | const std::vector< const Type * > & | Types | ) | [protected] |
This should really be private, but it squelches a bogus warning from GCC to make them protected: warning: `class StructType' only defines private constructors and has no friends
Private ctor - Only can be created by a static member...
Definition at line 447 of file Type.cpp.
References llvm::Type::ContainedTys, llvm::Type::isAbstract(), llvm::Type::setAbstract(), and llvm::Type::VoidTy.
StructType * StructType::get | ( | const std::vector< const Type * > & | Params | ) | [static] |
StructType::get - This static method is the primary way to create a StructType.
Definition at line 1160 of file Type.cpp.
References StructTypes.
Referenced by llvm::ConstantStruct::get(), llvm::DISerializer::getEmptyStructPtrType(), llvm::ProgramInfo::getSourceFiles(), llvm::ProgramInfo::getSourceFunctions(), llvm::DISerializer::getTagType(), llvm::DSNode::mergeTypeInfo(), and llvm::BytecodeReader::ParseType().
element_iterator llvm::StructType::element_begin | ( | ) | const [inline] |
Definition at line 176 of file DerivedTypes.h.
References llvm::Type::ContainedTys.
Referenced by calcTypeName(), getTypeDescription(), and llvm::DSNode::mergeTypeInfo().
element_iterator llvm::StructType::element_end | ( | ) | const [inline] |
Definition at line 177 of file DerivedTypes.h.
References llvm::Type::ContainedTys.
Referenced by calcTypeName(), getTypeDescription(), and llvm::DSNode::mergeTypeInfo().
unsigned llvm::StructType::getNumElements | ( | ) | const [inline] |
Definition at line 180 of file DerivedTypes.h.
References llvm::Type::ContainedTys.
Referenced by EvaluateStoreInto(), llvm::StructValType::get(), llvm::StructValType::hashTypeStructure(), llvm::BytecodeReader::ParseConstantPoolValue(), and TypesEqual().
const Type* llvm::StructType::getElementType | ( | unsigned | N | ) | const [inline] |
Definition at line 181 of file DerivedTypes.h.
References llvm::Type::ContainedTys.
Referenced by EvaluateStoreInto(), llvm::StructValType::get(), llvm::DSNode::mergeTypeInfo(), llvm::BytecodeReader::ParseConstantPoolValue(), and TypesEqual().
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 374 of file Type.cpp.
References llvm::Type::ContainedTys, Idx, indexValid(), and V.
bool StructType::indexValid | ( | const Value * | V | ) | const [virtual] |
Implements llvm::CompositeType.
Definition at line 363 of file Type.cpp.
References llvm::Type::ContainedTys, llvm::Type::UIntTy, and V.
Referenced by getTypeAtIndex().
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 1397 of file Type.cpp.
References StructTypes.
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 1402 of file Type.cpp.
References StructTypes.
static bool llvm::StructType::classof | ( | const StructType * | T | ) | [inline, static] |
Definition at line 197 of file DerivedTypes.h.
static bool llvm::StructType::classof | ( | const Type * | T | ) | [inline, static] |
Methods for support type inquiry through isa, cast, and dyn_cast:.
Reimplemented from llvm::CompositeType.
Definition at line 198 of file DerivedTypes.h.
References llvm::Type::getTypeID(), llvm::Type::StructTyID, and T.
friend class TypeMap< StructValType, StructType > [friend] |
Definition at line 155 of file DerivedTypes.h.