Function get_visibility

Source
pub fn get_visibility(val: &ValueRef) -> Visibility
Expand description

Get the visibility of the global value.

§Details

Retrieves the visibility attribute of a global value.

This function wraps the LLVMGetVisibility function from the LLVM core library. It returns the visibility attribute of 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.

§Returns

Returns a Visibility enum value representing the visibility attribute 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.