llvm::appendToGlobalDtors

Append F to the global destructors of module M.

Synopsis

Declared in <llvm/Transforms/Utils/ModuleUtils.h>

void
appendToGlobalDtors(
    Module& M,
    Function* F,
    int Priority,
    Constant* Data = nullptr);

Description

Same as appendToGlobalCtors(), but for global dtors.

Parameters

NameDescription
MModule whose global destructors are updated.
FFunction to append as a global destructor.
PriorityPriority of the destructor entry.
DataOptional associated data constant, or nullptr.