LLVM API Documentation

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

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


Member Typedef Documentation

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

Definition at line 133 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 367 of file Type.cpp.

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


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

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

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

Definition at line 150 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 876 of file Type.cpp.

References llvm::TypeMap< ValType, TypeClass >::add(), and llvm::TypeMap< ValType, TypeClass >::get().

Referenced by llvm::CloneFunction(), llvm::ConvertExpressionToType(), EnsureFunctionExists(), llvm::ExpressionConvertibleToType(), llvm::Module::getMainFunction(), llvm::Module::getOrInsertFunction(), llvm::BytecodeReader::ParseType(), ReplaceCallWith(), 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 143 of file DerivedTypes.h.

References llvm::Type::ContainedTys.

Referenced by calcTypeName(), CheckVarargs(), ConvertOperandToType(), llvm::Function::Function(), llvm::FunctionValType::get(), getTypeDescription(), llvm::FunctionValType::hashTypeStructure(), OperandConvertibleToType(), llvm::BytecodeReader::ParseInstruction(), ProcessGlobalsWithSameName(), ReplaceCallWith(), ResolveFunctions(), llvm::JIT::runFunction(), llvm::Interpreter::runFunction(), llvm::ExecutionEngine::runFunctionAsMain(), and TypesEqual().

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

Definition at line 138 of file DerivedTypes.h.

References llvm::Type::ContainedTys.

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

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

Definition at line 131 of file DerivedTypes.h.

References llvm::Type::ContainedTys.

Referenced by calcTypeName(), llvm::CloneFunction(), ConvertOperandToType(), llvm::FunctionValType::get(), llvm::Function::getReturnType(), getTypeDescription(), OperandConvertibleToType(), ReplaceCallWith(), llvm::JIT::runFunction(), and TypesEqual().

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

Definition at line 130 of file DerivedTypes.h.

Referenced by calcTypeName(), llvm::Interpreter::callFunction(), llvm::CloneFunction(), llvm::ConvertExpressionToType(), llvm::ExpressionConvertibleToType(), llvm::FunctionValType::get(), getTypeDescription(), llvm::FunctionValType::hashTypeStructure(), llvm::InlineFunction(), llvm::DSGraph::mergeInGraph(), OperandConvertibleToType(), llvm::BytecodeReader::ParseInstruction(), ResolveFunctions(), llvm::JIT::runFunction(), and TypesEqual().

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

Definition at line 134 of file DerivedTypes.h.

References llvm::Type::ContainedTys.

Referenced by calcTypeName(), llvm::ConvertExpressionToType(), llvm::ExpressionConvertibleToType(), getTypeDescription(), and llvm::BytecodeReader::ParseInstruction().

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

Definition at line 135 of file DerivedTypes.h.

References llvm::Type::ContainedTys.

Referenced by calcTypeName(), llvm::ConvertExpressionToType(), llvm::ExpressionConvertibleToType(), getTypeDescription(), and 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.

Implements llvm::AbstractTypeUser.

Definition at line 1228 of file Type.cpp.

References llvm::TypeMap< ValType, TypeClass >::finishRefinement().

Referenced by typeBecameConcrete().

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.

Implements llvm::AbstractTypeUser.

Definition at line 1233 of file Type.cpp.

References refineAbstractType().


Friends And Related Function Documentation

friend class TypeMap< FunctionValType, FunctionType > [friend]
 

Definition at line 107 of file DerivedTypes.h.


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