Use safe wrappers get_visibility and set_visibility

This commit is contained in:
Zalathar 2024-10-19 12:17:33 +11:00
parent 983d258be3
commit b114040afb
5 changed files with 20 additions and 33 deletions

View file

@ -242,6 +242,10 @@ pub fn set_linkage(llglobal: &Value, linkage: Linkage) {
}
}
pub fn get_visibility(llglobal: &Value) -> Visibility {
unsafe { LLVMRustGetVisibility(llglobal) }
}
pub fn set_visibility(llglobal: &Value, visibility: Visibility) {
unsafe {
LLVMRustSetVisibility(llglobal, visibility);