about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/llvm/mod.rs
diff options
context:
space:
mode:
authorLaurențiu Nicola <lnicola@dend.ro>2024-10-29 08:13:34 +0200
committerLaurențiu Nicola <lnicola@dend.ro>2024-10-29 08:13:34 +0200
commit772d1383f7c5ad2af087c5e409f55bf60f702254 (patch)
tree96e75912f27b58dca0562f9e4f5f050c25024580 /compiler/rustc_codegen_llvm/src/llvm/mod.rs
parent4b27980870eefce0928d03530fe4fb326230435d (diff)
parenta9d17627d241645a54c1134a20f1596127fedb60 (diff)
downloadrust-772d1383f7c5ad2af087c5e409f55bf60f702254.tar.gz
rust-772d1383f7c5ad2af087c5e409f55bf60f702254.zip
Merge from rust-lang/rust
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/llvm/mod.rs')
-rw-r--r--compiler/rustc_codegen_llvm/src/llvm/mod.rs12
1 files changed, 10 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_llvm/src/llvm/mod.rs b/compiler/rustc_codegen_llvm/src/llvm/mod.rs
index e837022044e..6aac2eea81d 100644
--- a/compiler/rustc_codegen_llvm/src/llvm/mod.rs
+++ b/compiler/rustc_codegen_llvm/src/llvm/mod.rs
@@ -232,15 +232,23 @@ pub fn set_global_constant(llglobal: &Value, is_constant: bool) {
     }
 }
 
+pub fn get_linkage(llglobal: &Value) -> Linkage {
+    unsafe { LLVMGetLinkage(llglobal) }.to_rust()
+}
+
 pub fn set_linkage(llglobal: &Value, linkage: Linkage) {
     unsafe {
-        LLVMRustSetLinkage(llglobal, linkage);
+        LLVMSetLinkage(llglobal, linkage);
     }
 }
 
+pub fn get_visibility(llglobal: &Value) -> Visibility {
+    unsafe { LLVMGetVisibility(llglobal) }.to_rust()
+}
+
 pub fn set_visibility(llglobal: &Value, visibility: Visibility) {
     unsafe {
-        LLVMRustSetVisibility(llglobal, visibility);
+        LLVMSetVisibility(llglobal, visibility);
     }
 }