Function set_visibility

Source
pub fn set_visibility(val: &ValueRef, visibility: Visibility)
Expand description

Set the visibility of the global value.

§Details

Sets the visibility attribute for a global value.

This function wraps the LLVMSetVisibility function from the LLVM core library. It configures the visibility attribute for the global value represented by ValueRef. The visibility attribute determines how the symbol is treated by the linker and whether it can be seen by other modules or shared libraries.

§Parameters

  • visibility: A Visibility enum value that specifies the visibility of the global value:
    • DefaultVisibility: The symbol is visible to other modules.
    • HiddenVisibility: The symbol is not visible to other modules or shared libraries.
    • ProtectedVisibility: The symbol is visible to other modules but cannot be overridden.