LLVM API Documentation

llvm::FunctionType Class Reference

#include <DerivedTypes.h>

Inheritance diagram for llvm::FunctionType:

Inheritance graph
[legend]
Collaboration diagram for llvm::FunctionType:

Collaboration graph
[legend]
List of all members.

Public Types

typedef std::vector< PATypeHandle
>::const_iterator 
param_iterator

Public Member Functions

bool isVarArg () const
const TypegetReturnType () const
param_iterator param_begin () const
param_iterator param_end () const
const TypegetParamType (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 FunctionTypeget (const Type *Result, const std::vector< const Type * > &Params, bool isVarArg)
static bool classof (const FunctionType *T)
static bool classof (const Type *T)
 Methods for support type inquiry through isa, cast, and dyn_cast:.

Protected Member Functions

 FunctionType (const Type *Result, const std::vector< const Type * > &Params, bool IsVarArgs)

Friends

class TypeMap< FunctionValType, FunctionType >

Detailed Description

FunctionType - Class to represent function types

Definition at line 77 of file DerivedTypes.h.


Member Typedef Documentation

typedef std::vector<PATypeHandle>::const_iterator llvm::FunctionType::param_iterator

Definition at line 104 of file DerivedTypes.h.


Constructor & Destructor Documentation

FunctionType::FunctionType ( const Type Result,
const std::vector< const Type * > &  Params,
bool  IsVarArgs 
) [protected]

This should really be private, but it squelches a bogus warning from GCC to make them protected: warning: `class FunctionType' only defines private constructors and has no friends

Private ctor - Only can be created by a static member...

Definition at line 407 of file Type.cpp.

References llvm::Type::ContainedTys, llvm::Type::isAbstract(), llvm::Type::isFirstClassType(), llvm::Type::setAbstract(), and llvm::Type::VoidTy.


Member Function Documentation

static bool llvm::FunctionType::classof ( const Type T  )  [inline, static]

Methods for support type inquiry through isa, cast, and dyn_cast:.

Reimplemented from llvm::DerivedType.

Definition at line 122 of file DerivedTypes.h.

References llvm::Type::FunctionTyID, llvm::Type::getTypeID(), and T.

static bool llvm::FunctionType::classof ( const FunctionType T  )  [inline, static]

Definition at line 121 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

Definition at line 989 of file Type.cpp.

References FunctionTypes.

Referenced by llvm::CloneFunction(), llvm::ConvertExpressionToType(), llvm::ExpressionConvertibleToType(), llvm::Module::getMainFunction(), llvm::Module::getOrInsertFunction(), llvm::BytecodeReader::ParseType(), and llvm::JIT::runFunction().

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 114 of file DerivedTypes.h.

References llvm::Type::ContainedTys.

Referenced by llvm::Function::Function(), llvm::FunctionValType::get(), getArgumentPermutation(), llvm::FunctionValType::hashTypeStructure(), OperandConvertibleToType(), llvm::BytecodeReader::ParseInstruction(), ReplaceCallWith(), ResolveFunctions(), llvm::JIT::runFunction(), llvm::ExecutionEngine::runFunctionAsMain(), TypesEqual(), llvm::UpgradeIntrinsicCall(), and llvm::InlineAsm::Verify().

const Type* llvm::FunctionType::getParamType ( unsigned  i  )  const [inline]

Definition at line 109 of file DerivedTypes.h.

References llvm::Type::ContainedTys.

Referenced by llvm::Function::Function(), llvm::FunctionValType::get(), OperandConvertibleToType(), llvm::BytecodeReader::ParseInstruction(), ReplaceCallWith(), ResolveFunctions(), llvm::JIT::runFunction(), TypesEqual(), and llvm::UpgradeIntrinsicCall().

const Type* llvm::FunctionType::getReturnType (  )  const [inline]

Definition at line 102 of file DerivedTypes.h.

References llvm::Type::ContainedTys.

Referenced by llvm::FunctionValType::get(), llvm::Function::getReturnType(), OperandConvertibleToType(), ReplaceCallWith(), llvm::JIT::runFunction(), TypesEqual(), and llvm::InlineAsm::Verify().

bool llvm::FunctionType::isVarArg (  )  const [inline]

Definition at line 101 of file DerivedTypes.h.

Referenced by EvaluateFunction(), llvm::FunctionValType::get(), llvm::FunctionValType::hashTypeStructure(), llvm::Function::isVarArg(), OperandConvertibleToType(), llvm::BytecodeReader::ParseInstruction(), ResolveFunctions(), llvm::JIT::runFunction(), TypesEqual(), and llvm::InlineAsm::Verify().

param_iterator llvm::FunctionType::param_begin (  )  const [inline]

Definition at line 105 of file DerivedTypes.h.

References llvm::Type::ContainedTys.

Referenced by llvm::BytecodeReader::ParseInstruction().

param_iterator llvm::FunctionType::param_end (  )  const [inline]

Definition at line 106 of file DerivedTypes.h.

References llvm::Type::ContainedTys.

Referenced by llvm::BytecodeReader::ParseInstruction().

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 1342 of file Type.cpp.

References FunctionTypes.

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 1347 of file Type.cpp.

References FunctionTypes.


Friends And Related Function Documentation

friend class TypeMap< FunctionValType, FunctionType > [friend]

Definition at line 78 of file DerivedTypes.h.


The documentation for this class was generated from the following files: