1
Fork 0

Use safe wrappers get_linkage and set_linkage

This commit is contained in:
Zalathar 2024-10-25 21:40:38 +11:00
parent 144a12acdd
commit 983d258be3
9 changed files with 59 additions and 60 deletions

View file

@ -232,6 +232,10 @@ pub fn set_global_constant(llglobal: &Value, is_constant: bool) {
}
}
pub fn get_linkage(llglobal: &Value) -> Linkage {
unsafe { LLVMRustGetLinkage(llglobal) }
}
pub fn set_linkage(llglobal: &Value, linkage: Linkage) {
unsafe {
LLVMRustSetLinkage(llglobal, linkage);