summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorDan Gohman <dev@sunfishcode.online>2022-09-28 14:43:58 -0700
committerDan Gohman <dev@sunfishcode.online>2022-09-28 14:43:58 -0700
commitbc5443a603efd83c0eacaac0bf5383280c81a6eb (patch)
tree17080bdd317abce28dcf84e1697a9c0ff07f5d06 /compiler/rustc_codegen_llvm/src
parent3c3bf76ce0cc9e569e04a242dfdc447131e21db9 (diff)
downloadrust-bc5443a603efd83c0eacaac0bf5383280c81a6eb.tar.gz
rust-bc5443a603efd83c0eacaac0bf5383280c81a6eb.zip
Use the existing `set_visibility` function.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
-rw-r--r--compiler/rustc_codegen_llvm/src/declare.rs2
-rw-r--r--compiler/rustc_codegen_llvm/src/llvm/mod.rs6
2 files changed, 1 insertions, 7 deletions
diff --git a/compiler/rustc_codegen_llvm/src/declare.rs b/compiler/rustc_codegen_llvm/src/declare.rs
index 21c466ddc24..3fbc803d5c3 100644
--- a/compiler/rustc_codegen_llvm/src/declare.rs
+++ b/compiler/rustc_codegen_llvm/src/declare.rs
@@ -42,7 +42,7 @@ fn declare_raw_fn<'ll>(
 
     llvm::SetFunctionCallConv(llfn, callconv);
     llvm::SetUnnamedAddress(llfn, unnamed);
-    llvm::SetVisibility(llfn, visibility);
+    llvm::set_visibility(llfn, visibility);
 
     let mut attrs = SmallVec::<[_; 4]>::new();
 
diff --git a/compiler/rustc_codegen_llvm/src/llvm/mod.rs b/compiler/rustc_codegen_llvm/src/llvm/mod.rs
index 942e7e0427c..6602a4ab863 100644
--- a/compiler/rustc_codegen_llvm/src/llvm/mod.rs
+++ b/compiler/rustc_codegen_llvm/src/llvm/mod.rs
@@ -172,12 +172,6 @@ pub fn SetUnnamedAddress(global: &Value, unnamed: UnnamedAddr) {
     }
 }
 
-pub fn SetVisibility(global: &Value, visibility: Visibility) {
-    unsafe {
-        LLVMRustSetVisibility(global, visibility);
-    }
-}
-
 pub fn set_thread_local_mode(global: &Value, mode: ThreadLocalMode) {
     unsafe {
         LLVMSetThreadLocalMode(global, mode);