Function set_gc

Source
pub fn set_gc(fn_val: &ValueRef, name: &str)
Expand description

Defines the garbage collector to use during code generation.

This function wraps the LLVMSetGC function from the LLVM core library. It sets the name of the garbage collector to be used for the specified function during code generation.

§Parameters

  • fn_val: The ValueRef representing the function.
  • name: The name (&str) of the garbage collector to set.

§Safety

  • The ValueRef must represent a valid function within a module.
  • The name must not contain null bytes.

§Example

set_gc(function, "my_gc");