LLVM API Documentation
#include <DerivedTypes.h>
Public Types | |
| typedef Type::subtype_iterator | param_iterator |
Public Member Functions | |
| bool | isVarArg () const |
| const Type * | getReturnType () const |
| param_iterator | param_begin () const |
| param_iterator | param_end () const |
| const Type * | getParamType (unsigned i) const |
| unsigned | getNumParams () const |
| virtual void | refineAbstractType (const DerivedType *OldTy, const Type *NewTy) |
| virtual void | typeBecameConcrete (const DerivedType *AbsTy) |
Static Public Member Functions | |
| static FunctionType * | get (const Type *Result, const std::vector< const Type * > &Params, bool isVarArg) |
| static FunctionType * | get (const Type *Result, bool isVarArg) |
| static bool | isValidReturnType (const Type *RetTy) |
| static bool | isValidArgumentType (const Type *ArgTy) |
| static bool | classof (const FunctionType *) |
| static bool | classof (const Type *T) |
| Methods for support type inquiry through isa, cast, and dyn_cast:. | |
Friends | |
| class | TypeMap< FunctionValType, FunctionType > |
Definition at line 147 of file DerivedTypes.h.
Definition at line 186 of file DerivedTypes.h.
| FunctionType * FunctionType::get | ( | const Type * | Result, | |
| const std::vector< const Type * > & | Params, | |||
| bool | isVarArg | |||
| ) | [static] |
FunctionType::get - This static method is the primary way of constructing a FunctionType.
| Result | The result type |
| Params | The types of the parameters |
| isVarArg | Whether this is a variable argument length function |
Definition at line 784 of file Type.cpp.
References DOUT, llvm::LLVMContextImpl::FunctionTypes, llvm::Type::getContext(), L, llvm::LLVMContext::pImpl, llvm::LLVMContextImpl::TypeMapLock, and VT.
Referenced by llvm::CloneFunction(), llvm::PointerTracking::doInitialization(), llvm::TypeBuilder< R(A1, A2, A3, A4, A5,...), cross >::get(), llvm::TypeBuilder< R(A1, A2, A3, A4,...), cross >::get(), llvm::TypeBuilder< R(A1, A2, A3,...), cross >::get(), llvm::TypeBuilder< R(A1, A2,...), cross >::get(), llvm::TypeBuilder< R(A1,...), cross >::get(), llvm::TypeBuilder< R(...), cross >::get(), llvm::TypeBuilder< R(A1, A2, A3, A4, A5), cross >::get(), llvm::TypeBuilder< R(A1, A2, A3, A4), cross >::get(), llvm::TypeBuilder< R(A1, A2, A3), cross >::get(), llvm::TypeBuilder< R(A1, A2), cross >::get(), llvm::TypeBuilder< R(A1), cross >::get(), llvm::TypeBuilder< R(), cross >::get(), llvm::Module::getOrInsertFunction(), llvm::Intrinsic::getType(), and llvm::JIT::runFunction().
| static FunctionType* llvm::FunctionType::get | ( | const Type * | Result, | |
| bool | isVarArg | |||
| ) | [inline, static] |
FunctionType::get - Create a FunctionType taking no parameters.
| Result | The result type |
| isVarArg | Whether this is a variable argument length function |
Definition at line 168 of file DerivedTypes.h.
isValidReturnType - Return true if the specified type is valid as a return type.
isValidReturnType - Return true if the specified type is valid as a return type.
Definition at line 364 of file Type.cpp.
References llvm::dyn_cast(), llvm::Type::getContext(), llvm::StructType::getElementType(), llvm::Type::getMetadataTy(), llvm::StructType::getNumElements(), llvm::Type::getVoidTy(), and llvm::Type::isFirstClassType().
isValidArgumentType - Return true if the specified type is valid as an argument type.
isValidArgumentType - Return true if the specified type is valid as an argument type.
Definition at line 389 of file Type.cpp.
References llvm::Type::getContext(), llvm::Type::getMetadataTy(), and llvm::Type::isFirstClassType().
| bool llvm::FunctionType::isVarArg | ( | ) | const [inline] |
Definition at line 183 of file DerivedTypes.h.
Referenced by llvm::Interpreter::callFunction(), llvm::CloneFunction(), llvm::X86ATTAsmPrinter::DecorateCygMingName(), llvm::X86IntelAsmPrinter::decorateName(), EvaluateFunction(), llvm::FunctionValType::get(), llvm::MSILWriter::getCallSignature(), hash(), llvm::FunctionValType::hashTypeStructure(), isEquivalentType(), llvm::Function::isVarArg(), RecursiveResolveTypesI(), llvm::JIT::runFunction(), TypesEqual(), llvm::InlineAsm::Verify(), and WriteTypeTable().
| const Type* llvm::FunctionType::getReturnType | ( | ) | const [inline] |
Definition at line 184 of file DerivedTypes.h.
References llvm::Type::ContainedTys.
Referenced by llvm::CloneFunction(), ffiInvoke(), llvm::FunctionValType::get(), llvm::MSILWriter::getCallSignature(), llvm::Function::getReturnType(), hash(), isEquivalentType(), llvm::JIT::runFunction(), llvm::ExecutionEngine::runFunctionAsMain(), TypesEqual(), UpgradeIntrinsicFunction1(), llvm::InlineAsm::Verify(), and WriteTypeTable().
| param_iterator llvm::FunctionType::param_begin | ( | ) | const [inline] |
Definition at line 187 of file DerivedTypes.h.
References llvm::Type::ContainedTys.
Referenced by LLVMGetParamTypes().
| param_iterator llvm::FunctionType::param_end | ( | ) | const [inline] |
Definition at line 188 of file DerivedTypes.h.
References llvm::Type::ContainedTys, and llvm::Type::NumContainedTys.
Referenced by LLVMGetParamTypes().
Definition at line 191 of file DerivedTypes.h.
References llvm::Type::ContainedTys.
Referenced by ffiInvoke(), llvm::FunctionValType::get(), llvm::MSILWriter::getCallSignature(), hash(), isEquivalentType(), llvm::JIT::runFunction(), llvm::ExecutionEngine::runFunctionAsMain(), ThunkGToF(), TypesEqual(), llvm::UpgradeIntrinsicCall(), UpgradeIntrinsicFunction1(), and WriteTypeTable().
| 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 196 of file DerivedTypes.h.
References llvm::Type::NumContainedTys.
Referenced by llvm::Function::arg_empty(), llvm::Function::arg_size(), llvm::X86ATTAsmPrinter::DecorateCygMingName(), llvm::X86IntelAsmPrinter::decorateName(), llvm::FunctionValType::get(), llvm::MSILWriter::getCallSignature(), hash(), llvm::FunctionValType::hashTypeStructure(), isEquivalentType(), llvm::JIT::runFunction(), llvm::Interpreter::runFunction(), llvm::ExecutionEngine::runFunctionAsMain(), TypesEqual(), UpgradeIntrinsicFunction1(), llvm::InlineAsm::Verify(), and WriteTypeTable().
| void FunctionType::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 1132 of file Type.cpp.
References llvm::LLVMContextImpl::FunctionTypes, llvm::Type::getContext(), and llvm::LLVMContext::pImpl.
| void FunctionType::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 1138 of file Type.cpp.
References llvm::LLVMContextImpl::FunctionTypes, llvm::Type::getContext(), and llvm::LLVMContext::pImpl.
| static bool llvm::FunctionType::classof | ( | const FunctionType * | ) | [inline, static] |
Definition at line 203 of file DerivedTypes.h.
Methods for support type inquiry through isa, cast, and dyn_cast:.
Reimplemented from llvm::DerivedType.
Definition at line 204 of file DerivedTypes.h.
References llvm::Type::FunctionTyID, and llvm::Type::getTypeID().
friend class TypeMap< FunctionValType, FunctionType > [friend] |
Definition at line 148 of file DerivedTypes.h.