about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/mono_item.rs
diff options
context:
space:
mode:
authorbjorn3 <17426603+bjorn3@users.noreply.github.com>2025-02-07 14:47:21 +0000
committerbjorn3 <17426603+bjorn3@users.noreply.github.com>2025-02-07 16:02:19 +0000
commit382e4031c28c3603fb279378f247f675e370291d (patch)
tree798d03c7963fd4a7b998994e6eac6e37c6e4fefa /compiler/rustc_codegen_llvm/src/mono_item.rs
parent550e035a5943f7beb5dee71e005aeba1e33ff28e (diff)
downloadrust-382e4031c28c3603fb279378f247f675e370291d.tar.gz
rust-382e4031c28c3603fb279378f247f675e370291d.zip
Remove Linkage::Private
This is the same as Linkage::Internal except that it doesn't emit any
symbol. Some backends may not support it and it isn't all that useful
anyway.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/mono_item.rs')
-rw-r--r--compiler/rustc_codegen_llvm/src/mono_item.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/compiler/rustc_codegen_llvm/src/mono_item.rs b/compiler/rustc_codegen_llvm/src/mono_item.rs
index 33789c6261f..70edee21bd6 100644
--- a/compiler/rustc_codegen_llvm/src/mono_item.rs
+++ b/compiler/rustc_codegen_llvm/src/mono_item.rs
@@ -71,10 +71,7 @@ impl<'tcx> PreDefineCodegenMethods<'tcx> for CodegenCx<'_, 'tcx> {
         // compiler-rt, then we want to implicitly compile everything with hidden
         // visibility as we're going to link this object all over the place but
         // don't want the symbols to get exported.
-        if linkage != Linkage::Internal
-            && linkage != Linkage::Private
-            && self.tcx.is_compiler_builtins(LOCAL_CRATE)
-        {
+        if linkage != Linkage::Internal && self.tcx.is_compiler_builtins(LOCAL_CRATE) {
             llvm::set_visibility(lldecl, llvm::Visibility::Hidden);
         } else {
             llvm::set_visibility(lldecl, base::visibility_to_llvm(visibility));