class FunctionType

Declaration

class FunctionType : public Type { /* full declaration omitted */ };

Description

Class to represent function types

Declared at: llvm/include/llvm/IR/DerivedTypes.h:108

Inherits from: Type

Member Variables

Inherited from Type:

protected NumContainedTys = 0
protected ContainedTys = nullptr

Method Overview

  • public FunctionType(const llvm::FunctionType &)
  • public static bool classof(const llvm::Type * T)
  • public static llvm::FunctionType * get(llvm::Type * Result, ArrayRef<llvm::Type *> Params, bool isVarArg)
  • public static llvm::FunctionType * get(llvm::Type * Result, bool isVarArg)
  • public unsigned int getNumParams() const
  • public llvm::Type * getParamType(unsigned int i) const
  • public llvm::Type * getReturnType() const
  • public static bool isValidArgumentType(llvm::Type * ArgTy)
  • public static bool isValidReturnType(llvm::Type * RetTy)
  • public bool isVarArg() const
  • public llvm::FunctionType::param_iterator param_begin() const
  • public llvm::FunctionType::param_iterator param_end() const
  • public ArrayRef<llvm::Type *> params() const

Inherited from Type:

Methods

FunctionType(const llvm::FunctionType&)

Declared at: llvm/include/llvm/IR/DerivedTypes.h:112

Parameters

const llvm::FunctionType&

static bool classof(const llvm::Type* T)

Description

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

Declared at: llvm/include/llvm/IR/DerivedTypes.h:147

Parameters

const llvm::Type* T

static llvm::FunctionType* get(
    llvm::Type* Result,
    ArrayRef<llvm::Type*> Params,
    bool isVarArg)

Description

This static method is the primary way of constructing a FunctionType.

Declared at: llvm/include/llvm/IR/DerivedTypes.h:116

Parameters

llvm::Type* Result
ArrayRef<llvm::Type*> Params
bool isVarArg

static llvm::FunctionType* get(llvm::Type* Result,
                               bool isVarArg)

Description

Create a FunctionType taking no parameters.

Declared at: llvm/include/llvm/IR/DerivedTypes.h:120

Parameters

llvm::Type* Result
bool isVarArg

unsigned int getNumParams() const

Description

Return the number of fixed parameters this function type requires. This does not consider varargs.

Declared at: llvm/include/llvm/IR/DerivedTypes.h:144

llvm::Type* getParamType(unsigned int i) const

Description

Parameter type accessors.

Declared at: llvm/include/llvm/IR/DerivedTypes.h:140

Parameters

unsigned int i

llvm::Type* getReturnType() const

Declared at: llvm/include/llvm/IR/DerivedTypes.h:129

static bool isValidArgumentType(llvm::Type* ArgTy)

Description

Return true if the specified type is valid as an argument type.

Declared at: llvm/include/llvm/IR/DerivedTypes.h:126

Parameters

llvm::Type* ArgTy

static bool isValidReturnType(llvm::Type* RetTy)

Description

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

Declared at: llvm/include/llvm/IR/DerivedTypes.h:123

Parameters

llvm::Type* RetTy

bool isVarArg() const

Declared at: llvm/include/llvm/IR/DerivedTypes.h:128

llvm::FunctionType::param_iterator param_begin()
    const

Declared at: llvm/include/llvm/IR/DerivedTypes.h:133

llvm::FunctionType::param_iterator param_end()
    const

Declared at: llvm/include/llvm/IR/DerivedTypes.h:134

ArrayRef<llvm::Type*> params() const

Declared at: llvm/include/llvm/IR/DerivedTypes.h:135