class GlobalIFunc

Declaration

class GlobalIFunc : public GlobalObject, public ilist_node { /* full declaration omitted */ };

Description

This is an important base class in LLVM. It provides the common facilities of all constant values in an LLVM program. A constant is a value that is immutable at runtime. Functions are constants because their address is immutable. Same with global variables. All constants share the capabilities provided in this class. All constants can have a null value. They can have an operand list. Constants can be simple (integer and floating point values), complex (arrays and structures), or expression based (computations yielding a constant value composed of only certain operators and other constant values). Note that Constants are immutable (once created they never change) and are fully shared by structural equivalence. This means that two structurally equivalent constants will always have the same address. Constants are created on demand as needed and never deleted: thus clients don't have to worry about the lifetime of the objects. LLVM Constant Representation

Declared at: llvm/include/llvm/IR/GlobalIFunc.h:34

Inherits from: GlobalObject, ilist_node

Member Variables

Inherited from GlobalObject:

protected ObjComdat = nullptr
protected static GlobalObjectSubClassDataBits = GlobalValueSubClassDataBits - GlobalObjectBits

Inherited from GlobalValue:

protected ValueType
protected Linkage
protected Visibility
protected UnnamedAddrVal
protected DllStorageClass
protected ThreadLocal
protected HasLLVMReservedName
protected IsDSOLocal
protected HasPartition
protected HasSanitizerMetadata
protected IntID = (unsigned int)0U
protected Parent = nullptr
protected static GlobalValueSubClassDataBits = 15

Inherited from Value:

protected SubclassOptionalData
protected NumUserOperands
protected IsUsedByMD
protected HasName
protected HasMetadata
protected HasHungOffUses
protected HasDescriptor
public static MaxAlignmentExponent = 32
public static MaximumAlignment = 1ULL << MaxAlignmentExponent

Method Overview

  • private GlobalIFunc(llvm::Type * Ty, unsigned int AddressSpace, llvm::GlobalValue::LinkageTypes Linkage, const llvm::Twine & Name, llvm::Constant * Resolver, llvm::Module * Parent)
  • public GlobalIFunc(const llvm::GlobalIFunc &)
  • public void applyAlongResolverPath(function_ref<void (const llvm::GlobalValue &)> Op) const
  • public static bool classof(const llvm::Value * V)
  • public void copyAttributesFrom(const llvm::GlobalIFunc * Src)
  • public static llvm::GlobalIFunc * create(llvm::Type * Ty, unsigned int AddressSpace, llvm::GlobalValue::LinkageTypes Linkage, const llvm::Twine & Name, llvm::Constant * Resolver, llvm::Module * Parent)
  • public void eraseFromParent()
  • public const llvm::Constant * getResolver() const
  • public llvm::Constant * getResolver()
  • public const llvm::Function * getResolverFunction() const
  • public llvm::Function * getResolverFunction()
  • public static llvm::FunctionType * getResolverFunctionType(llvm::Type * IFuncValTy)
  • public static bool isValidLinkage(llvm::GlobalValue::LinkageTypes L)
  • public void removeFromParent()
  • public void setResolver(llvm::Constant * Resolver)

Inherited from GlobalObject:

Inherited from GlobalValue:

Inherited from Constant:

Inherited from User:

Inherited from Value:

Methods

GlobalIFunc(
    llvm::Type* Ty,
    unsigned int AddressSpace,
    llvm::GlobalValue::LinkageTypes Linkage,
    const llvm::Twine& Name,
    llvm::Constant* Resolver,
    llvm::Module* Parent)

Declared at: llvm/include/llvm/IR/GlobalIFunc.h:37

Parameters

llvm::Type* Ty
unsigned int AddressSpace
llvm::GlobalValue::LinkageTypes Linkage
const llvm::Twine& Name
llvm::Constant* Resolver
llvm::Module* Parent

GlobalIFunc(const llvm::GlobalIFunc&)

Declared at: llvm/include/llvm/IR/GlobalIFunc.h:41

Parameters

const llvm::GlobalIFunc&

void applyAlongResolverPath(
    function_ref<void(const llvm::GlobalValue&)>
        Op) const

Declared at: llvm/include/llvm/IR/GlobalIFunc.h:101

Parameters

function_ref<void(const llvm::GlobalValue&)> Op

static bool classof(const llvm::Value* V)

Declared at: llvm/include/llvm/IR/GlobalIFunc.h:93

Parameters

const llvm::Value* V

void copyAttributesFrom(
    const llvm::GlobalIFunc* Src)

Declared at: llvm/include/llvm/IR/GlobalIFunc.h:57

Parameters

const llvm::GlobalIFunc* Src

static llvm::GlobalIFunc* create(
    llvm::Type* Ty,
    unsigned int AddressSpace,
    llvm::GlobalValue::LinkageTypes Linkage,
    const llvm::Twine& Name,
    llvm::Constant* Resolver,
    llvm::Module* Parent)

Description

If a parent module is specified, the ifunc is automatically inserted into the end of the specified module's ifunc list.

Declared at: llvm/include/llvm/IR/GlobalIFunc.h:46

Parameters

llvm::Type* Ty
unsigned int AddressSpace
llvm::GlobalValue::LinkageTypes Linkage
const llvm::Twine& Name
llvm::Constant* Resolver
llvm::Module* Parent

void eraseFromParent()

Description

This method unlinks 'this' from the containing module and deletes it.

Declared at: llvm/include/llvm/IR/GlobalIFunc.h:66

const llvm::Constant* getResolver() const

Declared at: llvm/include/llvm/IR/GlobalIFunc.h:70

llvm::Constant* getResolver()

Declared at: llvm/include/llvm/IR/GlobalIFunc.h:73

const llvm::Function* getResolverFunction() const

Declared at: llvm/include/llvm/IR/GlobalIFunc.h:77

llvm::Function* getResolverFunction()

Declared at: llvm/include/llvm/IR/GlobalIFunc.h:78

static llvm::FunctionType*
getResolverFunctionType(llvm::Type* IFuncValTy)

Declared at: llvm/include/llvm/IR/GlobalIFunc.h:83

Parameters

llvm::Type* IFuncValTy

static bool isValidLinkage(
    llvm::GlobalValue::LinkageTypes L)

Declared at: llvm/include/llvm/IR/GlobalIFunc.h:87

Parameters

llvm::GlobalValue::LinkageTypes L

void removeFromParent()

Description

This method unlinks 'this' from the containing module, but does not delete it.

Declared at: llvm/include/llvm/IR/GlobalIFunc.h:63

void setResolver(llvm::Constant* Resolver)

Description

These methods retrieve and set ifunc resolver function.

Declared at: llvm/include/llvm/IR/GlobalIFunc.h:69

Parameters

llvm::Constant* Resolver