Append F to the global constructors of module M.
Declared in <llvm/Transforms/Utils/ModuleUtils.h>
void
appendToGlobalCtors(
Module& M,
Function* F,
int Priority,
Constant* Data = nullptr);
This wraps the function in the appropriate structure and stores it along side other global constructors. For details see https://llvm.org/docs/LangRef.html#the-llvm-global-ctors-global-variable
| Name | Description |
|---|---|
| M | Module whose global constructors are updated. |
| F | Function to append as a global constructor. |
| Priority | Priority of the constructor entry. |
| Data | Optional associated data constant, or nullptr. |