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.
This commit is contained in:
parent
550e035a59
commit
382e4031c2
10 changed files with 4 additions and 19 deletions
|
@ -51,7 +51,6 @@ pub fn global_linkage_to_gcc(linkage: Linkage) -> GlobalKind {
|
|||
Linkage::WeakODR => unimplemented!(),
|
||||
Linkage::Appending => unimplemented!(),
|
||||
Linkage::Internal => GlobalKind::Internal,
|
||||
Linkage::Private => GlobalKind::Internal,
|
||||
Linkage::ExternalWeak => GlobalKind::Imported, // TODO(antoyo): should be weak linkage.
|
||||
Linkage::Common => unimplemented!(),
|
||||
}
|
||||
|
@ -68,7 +67,6 @@ pub fn linkage_to_gcc(linkage: Linkage) -> FunctionType {
|
|||
Linkage::WeakODR => unimplemented!(),
|
||||
Linkage::Appending => unimplemented!(),
|
||||
Linkage::Internal => FunctionType::Internal,
|
||||
Linkage::Private => FunctionType::Internal,
|
||||
Linkage::ExternalWeak => unimplemented!(),
|
||||
Linkage::Common => unimplemented!(),
|
||||
}
|
||||
|
|
|
@ -61,10 +61,7 @@ impl<'gcc, 'tcx> PreDefineCodegenMethods<'tcx> for CodegenCx<'gcc, '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) {
|
||||
#[cfg(feature = "master")]
|
||||
decl.add_attribute(FnAttribute::Visibility(gccjit::Visibility::Hidden));
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue