LLVM API Documentation
#include <DerivedTypes.h>
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 (LLVMContext &Context, const std::vector< const Type * > &Params, bool isPacked=false) |
| static StructType * | get (LLVMContext &Context, bool isPacked=false) |
| static StructType * | get (LLVMContext &Context, const Type *type,...) END_WITH_NULL |
| static bool | isValidElementType (const Type *ElemTy) |
| 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 > |
Definition at line 239 of file DerivedTypes.h.
Definition at line 271 of file DerivedTypes.h.
| StructType * StructType::get | ( | LLVMContext & | Context, | |
| 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 875 of file Type.cpp.
References DOUT, L, llvm::LLVMContext::pImpl, llvm::LLVMContextImpl::StructTypes, and llvm::LLVMContextImpl::TypeMapLock.
Referenced by llvm::DIFactory::DIFactory(), get(), llvm::ConstantStruct::get(), llvm::ConstantExpr::getAlignOf(), llvm::ProgramInfo::getSourceFiles(), and llvm::ProgramInfo::getSourceFunctions().
| static StructType* llvm::StructType::get | ( | LLVMContext & | Context, | |
| bool | isPacked = false | |||
| ) | [inline, static] |
StructType::get - Create an empty structure type.
Definition at line 255 of file DerivedTypes.h.
References Context.
| StructType * StructType::get | ( | LLVMContext & | Context, | |
| 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 899 of file Type.cpp.
References get().
isValidElementType - Return true if the specified type is valid as a element type.
Definition at line 910 of file Type.cpp.
References llvm::Type::getContext(), llvm::Type::getLabelTy(), llvm::Type::getMetadataTy(), and llvm::Type::getVoidTy().
| element_iterator llvm::StructType::element_begin | ( | ) | const [inline] |
Definition at line 272 of file DerivedTypes.h.
References llvm::Type::ContainedTys.
Referenced by LLVMGetStructElementTypes(), and WriteTypeTable().
| element_iterator llvm::StructType::element_end | ( | ) | const [inline] |
Definition at line 273 of file DerivedTypes.h.
References llvm::Type::ContainedTys, and llvm::Type::NumContainedTys.
Referenced by LLVMGetStructElementTypes(), and WriteTypeTable().
| unsigned llvm::StructType::getNumElements | ( | ) | const [inline] |
Definition at line 276 of file DerivedTypes.h.
References llvm::Type::NumContainedTys.
Referenced by BuildSubAggregate(), CompareTypes(), llvm::ConstantStruct::ConstantStruct(), EvaluateStoreInto(), llvm::TargetData::getStructLayout(), llvm::StructValType::hashTypeStructure(), isEquivalentType(), llvm::FunctionType::isValidReturnType(), PerformHeapAllocSRoA(), TypesEqual(), and llvm::InlineAsm::Verify().
Definition at line 277 of file DerivedTypes.h.
References llvm::Type::ContainedTys, and llvm::Type::NumContainedTys.
Referenced by BuildSubAggregate(), CompareTypes(), llvm::ConstantStruct::ConstantStruct(), EvaluateStoreInto(), GetHeapSROAValue(), isEquivalentType(), llvm::FunctionType::isValidReturnType(), PerformHeapAllocSRoA(), 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 292 of file Type.cpp.
References Idx.
Implements llvm::CompositeType.
Definition at line 297 of file Type.cpp.
References llvm::Type::ContainedTys, and indexValid().
Implements llvm::CompositeType.
Definition at line 277 of file Type.cpp.
References llvm::Value::getContext(), llvm::Type::getInt32Ty(), and llvm::Value::getType().
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 1178 of file Type.cpp.
References llvm::Type::getContext(), llvm::LLVMContext::pImpl, and llvm::LLVMContextImpl::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 1184 of file Type.cpp.
References llvm::Type::getContext(), llvm::LLVMContext::pImpl, and llvm::LLVMContextImpl::StructTypes.
| static bool llvm::StructType::classof | ( | const StructType * | ) | [inline, static] |
Definition at line 295 of file DerivedTypes.h.
Methods for support type inquiry through isa, cast, and dyn_cast:.
Reimplemented from llvm::CompositeType.
Definition at line 296 of file DerivedTypes.h.
References llvm::Type::getTypeID(), and llvm::Type::StructTyID.
| bool llvm::StructType::isPacked | ( | ) | const [inline] |
Definition at line 300 of file DerivedTypes.h.
References llvm::Type::getSubclassData().
Referenced by EvaluateStoreInto(), isEquivalentType(), TypesEqual(), and WriteTypeTable().
friend class TypeMap< StructValType, StructType > [friend] |
Definition at line 240 of file DerivedTypes.h.