Function delete_function

Source
pub fn delete_function(val: &ValueRef)
Expand description

Removes a function from its containing module and deallocates it.

This function wraps the LLVMDeleteFunction function from the LLVM core library. It removes the function represented by val from its parent module and deallocates all associated resources. After calling this function, the ValueRef should no longer be used, as it references deallocated memory.

ยงSafety

  • The ValueRef must represent a valid function within a module.
  • After deletion, the ValueRef becomes invalid and should not be used.