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 Type::subtype_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

FunctionTypeget (const Type *Result, const std::vector< const Type * > &Params, bool isVarArg)
bool isValidReturnType (const Type *RetTy)
bool classof (const FunctionType *)
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

typedef Type::subtype_iterator llvm::FunctionType::param_iterator
 

Definition at line 165 of file DerivedTypes.h.

Referenced by calcTypeName(), getTypeDescription(), LLVMGetParamTypes(), LLVMGetStructElementTypes(), param_begin(), param_end(), and CWriter::printStructReturnPointerFunctionType().


Member Function Documentation

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

References llvm::Type::getTypeID().

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

Definition at line 182 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.

Parameters:
ReturnType  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 FunctionTypes.

Referenced by llvm::CloneFunction().

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

Referenced by llvm::Function::arg_empty(), llvm::Function::arg_size(), calcTypeName(), FPrintFOpt::CallOptimizer(), FPutsOpt::CallOptimizer(), FWriteOpt::CallOptimizer(), SPrintFOpt::CallOptimizer(), PrintFOpt::CallOptimizer(), ToAsciiOpt::CallOptimizer(), AbsOpt::CallOptimizer(), IsAsciiOpt::CallOptimizer(), IsDigitOpt::CallOptimizer(), FFSOpt::CallOptimizer(), UnaryDoubleFPOpt::CallOptimizer(), Exp2Opt::CallOptimizer(), PowOpt::CallOptimizer(), MemCpyOpt::CallOptimizer(), MemCmpOpt::CallOptimizer(), StrLenOpt::CallOptimizer(), StrCpyOpt::CallOptimizer(), StrNCmpOpt::CallOptimizer(), StrCmpOpt::CallOptimizer(), StrChrOpt::CallOptimizer(), StrCatOpt::CallOptimizer(), llvm::X86IntelAsmPrinter::decorateName(), llvm::X86ATTAsmPrinter::decorateName(), llvm::FunctionValType::get(), MSILWriter::getCallSignature(), getTypeDescription(), llvm::FunctionValType::hashTypeStructure(), LowerPartSelect(), LowerPartSet(), llvm::JIT::runFunction(), llvm::Interpreter::runFunction(), llvm::ExecutionEngine::runFunctionAsMain(), TypesEqual(), UpgradeIntrinsicFunction1(), llvm::InlineAsm::Verify(), Verifier::VerifyCallSite(), Verifier::VerifyFunctionAttrs(), Verifier::VerifyIntrinsicPrototype(), Verifier::visitFunction(), WriteInstruction(), and WriteTypeTable().

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

Definition at line 170 of file DerivedTypes.h.

Referenced by FPrintFOpt::CallOptimizer(), FPutsOpt::CallOptimizer(), FWriteOpt::CallOptimizer(), SPrintFOpt::CallOptimizer(), PrintFOpt::CallOptimizer(), ToAsciiOpt::CallOptimizer(), AbsOpt::CallOptimizer(), IsAsciiOpt::CallOptimizer(), IsDigitOpt::CallOptimizer(), FFSOpt::CallOptimizer(), UnaryDoubleFPOpt::CallOptimizer(), Exp2Opt::CallOptimizer(), PowOpt::CallOptimizer(), MemCpyOpt::CallOptimizer(), MemCmpOpt::CallOptimizer(), StrLenOpt::CallOptimizer(), StrCpyOpt::CallOptimizer(), StrNCmpOpt::CallOptimizer(), StrCmpOpt::CallOptimizer(), StrChrOpt::CallOptimizer(), StrCatOpt::CallOptimizer(), llvm::FunctionValType::get(), MSILWriter::getCallSignature(), LowerPartSelect(), LowerPartSet(), llvm::JIT::runFunction(), llvm::ExecutionEngine::runFunctionAsMain(), TypesEqual(), llvm::UpgradeIntrinsicCall(), UpgradeIntrinsicFunction1(), Verifier::VerifyCallSite(), Verifier::VerifyFunctionAttrs(), Verifier::VerifyIntrinsicPrototype(), Verifier::visitFunction(), and WriteTypeTable().

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

Definition at line 163 of file DerivedTypes.h.

Referenced by calcTypeName(), FPrintFOpt::CallOptimizer(), FWriteOpt::CallOptimizer(), SPrintFOpt::CallOptimizer(), PrintFOpt::CallOptimizer(), ToAsciiOpt::CallOptimizer(), AbsOpt::CallOptimizer(), IsAsciiOpt::CallOptimizer(), IsDigitOpt::CallOptimizer(), FFSOpt::CallOptimizer(), UnaryDoubleFPOpt::CallOptimizer(), Exp2Opt::CallOptimizer(), PowOpt::CallOptimizer(), MemCpyOpt::CallOptimizer(), MemCmpOpt::CallOptimizer(), StrLenOpt::CallOptimizer(), StrCpyOpt::CallOptimizer(), StrNCmpOpt::CallOptimizer(), StrCmpOpt::CallOptimizer(), StrChrOpt::CallOptimizer(), StrCatOpt::CallOptimizer(), llvm::CloneFunction(), llvm::FunctionValType::get(), MSILWriter::getCallSignature(), llvm::Function::getReturnType(), getTypeDescription(), lle_X___strdup(), lle_X_calloc(), lle_X_fopen(), lle_X_freopen(), lle_X_malloc(), lle_X_memcpy(), lle_X_memmove(), lle_X_memset(), lle_X_realloc(), lle_X_strcat(), lle_X_strcpy(), lle_X_strdup(), LowerPartSelect(), LowerPartSet(), llvm::JIT::runFunction(), llvm::ExecutionEngine::runFunctionAsMain(), TypesEqual(), UpgradeIntrinsicFunction1(), llvm::InlineAsm::Verify(), Verifier::VerifyFunctionAttrs(), Verifier::VerifyIntrinsicPrototype(), and WriteTypeTable().

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

isValidReturnType - Return true if the specified type is valid as a return type.

Definition at line 435 of file Type.cpp.

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

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

Definition at line 162 of file DerivedTypes.h.

Referenced by calcTypeName(), llvm::Interpreter::callFunction(), llvm::CloneFunction(), llvm::X86IntelAsmPrinter::decorateName(), llvm::X86ATTAsmPrinter::decorateName(), EvaluateFunction(), llvm::FunctionValType::get(), MSILWriter::getCallSignature(), getTypeDescription(), llvm::FunctionValType::hashTypeStructure(), llvm::InlineFunction(), llvm::Function::isVarArg(), llvm::SelectionDAGLowering::LowerCallTo(), CWriter::printStructReturnPointerFunctionType(), RecursiveResolveTypesI(), llvm::JIT::runFunction(), TailCallElim::runOnFunction(), DAE::runOnModule(), TypesEqual(), llvm::InlineAsm::Verify(), Verifier::VerifyCallSite(), Verifier::VerifyIntrinsicPrototype(), WriteInstruction(), and WriteTypeTable().

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

Definition at line 166 of file DerivedTypes.h.

References param_iterator.

Referenced by calcTypeName(), getTypeDescription(), LLVMGetParamTypes(), and CWriter::printStructReturnPointerFunctionType().

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

Definition at line 167 of file DerivedTypes.h.

References param_iterator.

Referenced by calcTypeName(), getTypeDescription(), LLVMGetParamTypes(), and CWriter::printStructReturnPointerFunctionType().

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.

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

References FunctionTypes.


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:


This web site is hosted by the Computer Science Department at the University of Illinois at Urbana-Champaign.