Rollup merge of #136691 - bjorn3:linkage_cleanup, r=jieyouxu
Remove Linkage::Private and Linkage::Appending Neither of them has any use case. Neither known nor theoretical.
This commit is contained in:
commit
c9771e9590
10 changed files with 4 additions and 26 deletions
|
@ -157,9 +157,7 @@ pub(crate) fn linkage_to_llvm(linkage: Linkage) -> llvm::Linkage {
|
|||
Linkage::LinkOnceODR => llvm::Linkage::LinkOnceODRLinkage,
|
||||
Linkage::WeakAny => llvm::Linkage::WeakAnyLinkage,
|
||||
Linkage::WeakODR => llvm::Linkage::WeakODRLinkage,
|
||||
Linkage::Appending => llvm::Linkage::AppendingLinkage,
|
||||
Linkage::Internal => llvm::Linkage::InternalLinkage,
|
||||
Linkage::Private => llvm::Linkage::PrivateLinkage,
|
||||
Linkage::ExternalWeak => llvm::Linkage::ExternalWeakLinkage,
|
||||
Linkage::Common => llvm::Linkage::CommonLinkage,
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue