LLVM API Documentation

llvm::FunctionType Class Reference

#include <DerivedTypes.h>

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

List of all members.

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 bool isValidReturnType (const Type *RetTy)
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 >


Detailed Description

FunctionType - Class to represent function types

Definition at line 139 of file DerivedTypes.h.


Member Typedef Documentation

Definition at line 165 of file DerivedTypes.h.


Member Function Documentation

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.

Parameters:
Result  The result type
Params  The types of the parameters
isVarArg  Whether this is a variable argument length function

Definition at line 1104 of file Type.cpp.

References DOUT, and VT.

Referenced by llvm::CloneFunction(), llvm::Module::getOrInsertFunction(), llvm::Intrinsic::getType(), and llvm::JIT::runFunction().

bool FunctionType::isValidReturnType ( const Type *  RetTy  )  [static]

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

References llvm::dyn_cast(), llvm::StructType::getElementType(), llvm::StructType::getNumElements(), and llvm::Type::isFirstClassType().

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

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

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

Definition at line 166 of file DerivedTypes.h.

References llvm::Type::ContainedTys.

Referenced by calcTypeName(), getTypeDescription(), and LLVMGetParamTypes().

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

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

unsigned llvm::FunctionType::getNumParams (  )  const [inline]

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

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

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

Definition at line 182 of file DerivedTypes.h.

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

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

Reimplemented from llvm::DerivedType.

Definition at line 183 of file DerivedTypes.h.

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


Friends And Related Function Documentation

friend class TypeMap< FunctionValType, FunctionType > [friend]

Definition at line 140 of file DerivedTypes.h.


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