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 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 >


Detailed Description

FunctionType - Class to represent function types

Definition at line 147 of file DerivedTypes.h.


Member Typedef Documentation

Definition at line 186 of file DerivedTypes.h.


Member Function Documentation

FunctionType * FunctionType::get ( const Type *  Result,
const std::vector< const Type * > &  Params,
bool  isVarArg 
) [static]

static FunctionType* llvm::FunctionType::get ( const Type *  Result,
bool  isVarArg 
) [inline, static]

FunctionType::get - Create a FunctionType taking no parameters.

Parameters:
Result  The result type
isVarArg  Whether this is a variable argument length function

Definition at line 168 of file DerivedTypes.h.

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 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().

bool FunctionType::isValidArgumentType ( const Type *  ArgTy  )  [static]

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]

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

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().

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 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.

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


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