LLVM API Documentation
#include <DerivedTypes.h>
Public Types | |
typedef Type::subtype_iterator | param_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. | |
unsigned | getNumParams () const |
Static Public Member Functions | |
static FunctionType * | get (Type *Result, ArrayRef< Type * > Params, bool isVarArg) |
static FunctionType * | get (Type *Result, bool isVarArg) |
static bool | isValidReturnType (Type *RetTy) |
static bool | isValidArgumentType (Type *ArgTy) |
static bool | classof (const Type *T) |
Methods for support type inquiry through isa, cast, and dyn_cast. |
FunctionType - Class to represent function types
Definition at line 96 of file DerivedTypes.h.
Definition at line 123 of file DerivedTypes.h.
static bool llvm::FunctionType::classof | ( | const Type * | T | ) | [inline, static] |
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().
FunctionType * FunctionType::get | ( | Type * | Result, |
ArrayRef< Type * > | Params, | ||
bool | isVarArg | ||
) | [static] |
FunctionType::get - This static method is the primary way of constructing a FunctionType.
Definition at line 359 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(), 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(), LLVMFunctionType(), ReplaceCallWith(), and UpgradeIntrinsicFunction1().
FunctionType * FunctionType::get | ( | Type * | Result, |
bool | isVarArg | ||
) | [static] |
FunctionType::get - Create a FunctionType taking no parameters.
Definition at line 380 of file Type.cpp.
References isVarArg(), and llvm::None.
unsigned llvm::FunctionType::getNumParams | ( | ) | const [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(), isMemsetPattern16(), isTrigLibCall(), llvm::HexagonTargetLowering::LowerCall(), llvm::TypePrinting::print(), llvm::AssemblyWriter::printFunction(), llvm::Interpreter::runFunction(), llvm::MCJIT::runFunction(), llvm::ExecutionEngine::runFunctionAsMain(), llvm::FastISel::CallLoweringInfo::setCallee(), llvm::TargetLowering::CallLoweringInfo::setCallee(), UpgradeX86IntrinsicsWith8BitMask(), llvm::InlineAsm::Verify(), and WriteTypeTable().
Type* llvm::FunctionType::getParamType | ( | unsigned | i | ) | const [inline] |
Parameter type accessors.
Definition at line 128 of file DerivedTypes.h.
References llvm::Type::ContainedTys.
Referenced by llvm::AArch64TargetLowering::emitStoreConditional(), llvm::ARMTargetLowering::emitStoreConditional(), FindCXAAtExit(), llvm::SimplifyFortifiedLibCalls::fold(), getAllocationData(), llvm::isFreeCall(), isMemsetPattern16(), isTrigLibCall(), llvm::SITargetLowering::LowerFormalArguments(), needsFPStubFromParams(), llvm::AssemblyWriter::printFunction(), llvm::MCJIT::runFunction(), llvm::ExecutionEngine::runFunctionAsMain(), UpgradeSSE41Function(), UpgradeX86IntrinsicsWith8BitMask(), whichFPParamVariantNeeded(), and WriteTypeTable().
Type* llvm::FunctionType::getReturnType | ( | ) | const [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(), isTrigLibCall(), needsFPReturnHelper(), llvm::TypePrinting::print(), llvm::MCJIT::runFunction(), llvm::ExecutionEngine::runFunctionAsMain(), SimplifyCall(), llvm::InlineAsm::Verify(), and WriteTypeTable().
bool FunctionType::isValidArgumentType | ( | Type * | ArgTy | ) | [static] |
isValidArgumentType - Return true if the specified type is valid as an argument type.
Definition at line 393 of file Type.cpp.
References llvm::Type::isFirstClassType().
bool FunctionType::isValidReturnType | ( | Type * | RetTy | ) | [static] |
isValidReturnType - Return true if the specified type is valid as a return type.
Definition at line 386 of file Type.cpp.
References llvm::Type::isFunctionTy(), llvm::Type::isLabelTy(), and llvm::Type::isMetadataTy().
bool llvm::FunctionType::isVarArg | ( | ) | const [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(), isMemsetPattern16(), llvm::Function::isVarArg(), llvm::TypePrinting::print(), llvm::AssemblyWriter::printFunction(), llvm::MCJIT::runFunction(), llvm::FastISel::CallLoweringInfo::setCallee(), llvm::TargetLowering::CallLoweringInfo::setCallee(), llvm::InlineAsm::Verify(), and WriteTypeTable().
param_iterator llvm::FunctionType::param_begin | ( | ) | const [inline] |
Definition at line 124 of file DerivedTypes.h.
References llvm::Type::ContainedTys.
Referenced by LLVMGetParamTypes(), and llvm::TypePrinting::print().
param_iterator llvm::FunctionType::param_end | ( | ) | const [inline] |
Definition at line 125 of file DerivedTypes.h.
References llvm::Type::ContainedTys, and llvm::Type::NumContainedTys.
Referenced by LLVMGetParamTypes(), and llvm::TypePrinting::print().