LLVM API Documentation
#include <DerivedTypes.h>
Public Types | |
typedef Type::subtype_iterator | param_iterator |
![]() | |
enum | TypeID { VoidTyID = 0, HalfTyID, FloatTyID, DoubleTyID, X86_FP80TyID, FP128TyID, PPC_FP128TyID, LabelTyID, MetadataTyID, X86_MMXTyID, IntegerTyID, FunctionTyID, StructTyID, ArrayTyID, PointerTyID, VectorTyID, NumTypeIDs, LastPrimitiveTyID = X86_MMXTyID, FirstDerivedTyID = IntegerTyID } |
typedef Type *const * | subtype_iterator |
typedef std::reverse_iterator < subtype_iterator > | subtype_reverse_iterator |
Public Member Functions | |
bool | isVarArg () const |
Type * | getReturnType () const |
param_iterator | param_begin () const |
param_iterator | param_end () const |
Type * | getParamType (unsigned i) const |
Parameter type accessors. More... | |
unsigned | getNumParams () const |
![]() | |
void | print (raw_ostream &O) const |
void | dump () const |
LLVMContext & | getContext () const |
getContext - Return the LLVMContext in which this type was uniqued. More... | |
TypeID | getTypeID () const |
bool | isVoidTy () const |
isVoidTy - Return true if this is 'void'. More... | |
bool | isHalfTy () const |
isHalfTy - Return true if this is 'half', a 16-bit IEEE fp type. More... | |
bool | isFloatTy () const |
isFloatTy - Return true if this is 'float', a 32-bit IEEE fp type. More... | |
bool | isDoubleTy () const |
isDoubleTy - Return true if this is 'double', a 64-bit IEEE fp type. More... | |
bool | isX86_FP80Ty () const |
isX86_FP80Ty - Return true if this is x86 long double. More... | |
bool | isFP128Ty () const |
isFP128Ty - Return true if this is 'fp128'. More... | |
bool | isPPC_FP128Ty () const |
isPPC_FP128Ty - Return true if this is powerpc long double. More... | |
bool | isFloatingPointTy () const |
const fltSemantics & | getFltSemantics () const |
bool | isX86_MMXTy () const |
isX86_MMXTy - Return true if this is X86 MMX. More... | |
bool | isFPOrFPVectorTy () const |
bool | isLabelTy () const |
isLabelTy - Return true if this is 'label'. More... | |
bool | isMetadataTy () const |
isMetadataTy - Return true if this is 'metadata'. More... | |
bool | isIntegerTy () const |
bool | isIntegerTy (unsigned Bitwidth) const |
isIntegerTy - Return true if this is an IntegerType of the given width. More... | |
bool | isIntOrIntVectorTy () const |
bool | isFunctionTy () const |
bool | isStructTy () const |
bool | isArrayTy () const |
bool | isPointerTy () const |
bool | isPtrOrPtrVectorTy () const |
bool | isVectorTy () const |
bool | canLosslesslyBitCastTo (Type *Ty) const |
Determine if this type could be losslessly bitcast to Ty. More... | |
bool | isEmptyTy () const |
bool | isPrimitiveType () const |
bool | isDerivedType () const |
bool | isFirstClassType () const |
bool | isSingleValueType () const |
bool | isAggregateType () const |
bool | isSized () const |
unsigned | getPrimitiveSizeInBits () const |
unsigned | getScalarSizeInBits () |
int | getFPMantissaWidth () const |
const Type * | getScalarType () const |
Type * | getScalarType () |
subtype_iterator | subtype_begin () const |
subtype_iterator | subtype_end () const |
subtype_reverse_iterator | subtype_rbegin () const |
subtype_reverse_iterator | subtype_rend () const |
Type * | getContainedType (unsigned i) const |
unsigned | getNumContainedTypes () const |
unsigned | getIntegerBitWidth () const |
Type * | getFunctionParamType (unsigned i) const |
unsigned | getFunctionNumParams () const |
bool | isFunctionVarArg () const |
StringRef | getStructName () const |
unsigned | getStructNumElements () const |
Type * | getStructElementType (unsigned N) const |
Type * | getSequentialElementType () const |
uint64_t | getArrayNumElements () const |
Type * | getArrayElementType () const |
unsigned | getVectorNumElements () const |
Type * | getVectorElementType () const |
Type * | getPointerElementType () const |
unsigned | getPointerAddressSpace () const |
Get the address space of this pointer or pointer vector type. More... | |
PointerType * | getPointerTo (unsigned AddrSpace=0) |
Additional Inherited Members | |
![]() | |
Type (LLVMContext &C, TypeID tid) | |
~Type () | |
void | setTypeID (TypeID ID) |
unsigned | getSubclassData () const |
void | setSubclassData (unsigned val) |
![]() | |
unsigned | NumContainedTys |
Type *const * | ContainedTys |
FunctionType - Class to represent function types
Definition at line 96 of file DerivedTypes.h.
Definition at line 123 of file DerivedTypes.h.
Methods for support type inquiry through isa, cast, and dyn_cast.
Definition at line 136 of file DerivedTypes.h.
References llvm::Type::FunctionTyID, and llvm::Type::getTypeID().
|
static |
FunctionType::get - This static method is the primary way of constructing a FunctionType.
Definition at line 361 of file Type.cpp.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::end(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::find_as(), llvm::LLVMContextImpl::FunctionTypes, llvm::Type::getContext(), I, llvm::LLVMContext::pImpl, llvm::ArrayRef< T >::size(), and llvm::LLVMContextImpl::TypeAllocator.
Referenced by appendToGlobalArray(), llvm::CloneFunction(), EnsureFunctionExists(), GenerateARCBBEntranceAnnotation(), GenerateARCBBTerminatorAnnotation(), llvm::TypeBuilder< R(), cross >::get(), llvm::TypeBuilder< R(A1), cross >::get(), llvm::TypeBuilder< R(A1, A2), cross >::get(), llvm::TypeBuilder< R(A1, A2, A3), cross >::get(), llvm::TypeBuilder< R(A1, A2, A3, A4), cross >::get(), llvm::TypeBuilder< R(A1, A2, A3, A4, A5), cross >::get(), llvm::TypeBuilder< R(...), cross >::get(), llvm::TypeBuilder< R(A1,...), cross >::get(), llvm::TypeBuilder< R(A1, A2,...), cross >::get(), llvm::TypeBuilder< R(A1, A2, A3,...), cross >::get(), llvm::TypeBuilder< R(A1, A2, A3, A4,...), cross >::get(), llvm::TypeBuilder< R(A1, A2, A3, A4, A5,...), cross >::get(), llvm::Module::getOrInsertFunction(), llvm::Intrinsic::getType(), inlineAsmOut(), InstallGlobalCtors(), LLVMFunctionType(), ReplaceCallWith(), llvm::JIT::runFunction(), and UpgradeIntrinsicFunction1().
|
static |
FunctionType::get - Create a FunctionType taking no parameters.
Definition at line 382 of file Type.cpp.
References isVarArg(), and llvm::None.
|
inline |
getNumParams - Return the number of fixed parameters this function type requires. This does not consider varargs.
Definition at line 133 of file DerivedTypes.h.
References llvm::Type::NumContainedTys.
Referenced by llvm::Function::arg_empty(), llvm::Function::arg_size(), FindCXAAtExit(), llvm::SimplifyFortifiedLibCalls::fold(), getAllocationData(), llvm::Mangler::getNameWithPrefix(), llvm::isFreeCall(), llvm::HexagonTargetLowering::LowerCall(), llvm::TypePrinting::print(), llvm::AssemblyWriter::printFunction(), profileFunction(), llvm::Interpreter::runFunction(), llvm::JIT::runFunction(), llvm::MCJIT::runFunction(), llvm::ExecutionEngine::runFunctionAsMain(), llvm::InlineAsm::Verify(), and WriteTypeTable().
Parameter type accessors.
Definition at line 128 of file DerivedTypes.h.
References llvm::Type::ContainedTys.
Referenced by FindCXAAtExit(), llvm::SimplifyFortifiedLibCalls::fold(), getAllocationData(), llvm::isFreeCall(), llvm::SITargetLowering::LowerFormalArguments(), needsFPStubFromParams(), llvm::AssemblyWriter::printFunction(), profileFunction(), llvm::JIT::runFunction(), llvm::MCJIT::runFunction(), llvm::ExecutionEngine::runFunctionAsMain(), UpgradeSSE41Function(), whichFPParamVariantNeeded(), and WriteTypeTable().
|
inline |
Definition at line 121 of file DerivedTypes.h.
References llvm::Type::ContainedTys.
Referenced by llvm::CloneFunction(), FindCXAAtExit(), llvm::SimplifyFortifiedLibCalls::fold(), getAllocationData(), llvm::Function::getReturnType(), llvm::isFreeCall(), llvm::TypePrinting::print(), profileFunction(), llvm::JIT::runFunction(), llvm::MCJIT::runFunction(), llvm::ExecutionEngine::runFunctionAsMain(), SimplifyCall(), llvm::InlineAsm::Verify(), and WriteTypeTable().
isValidArgumentType - Return true if the specified type is valid as an argument type.
Definition at line 395 of file Type.cpp.
References llvm::Type::isFirstClassType().
isValidReturnType - Return true if the specified type is valid as a return type.
Definition at line 388 of file Type.cpp.
References llvm::Type::isFunctionTy(), llvm::Type::isLabelTy(), and llvm::Type::isMetadataTy().
|
inline |
Definition at line 120 of file DerivedTypes.h.
References llvm::Type::getSubclassData().
Referenced by llvm::Interpreter::callFunction(), llvm::CloneFunction(), llvm::ComputeUsesVAFloatArgument(), get(), llvm::Mangler::getNameWithPrefix(), llvm::InlineFunction(), llvm::Function::isVarArg(), llvm::TypePrinting::print(), llvm::AssemblyWriter::printFunction(), profileFunction(), llvm::JIT::runFunction(), llvm::MCJIT::runFunction(), llvm::InlineAsm::Verify(), and WriteTypeTable().
|
inline |
Definition at line 124 of file DerivedTypes.h.
References llvm::Type::ContainedTys.
Referenced by LLVMGetParamTypes(), and llvm::TypePrinting::print().
|
inline |
Definition at line 125 of file DerivedTypes.h.
References llvm::Type::ContainedTys, and llvm::Type::NumContainedTys.
Referenced by LLVMGetParamTypes(), and llvm::TypePrinting::print().