Remove InstanceKind::generates_cgu_internal_copy
This commit is contained in:
parent
8ad2c9724d
commit
817e2c598d
3 changed files with 68 additions and 64 deletions
|
@ -93,16 +93,11 @@ fn reachable_non_generics_provider(tcx: TyCtxt<'_>, _: LocalCrate) -> DefIdMap<S
|
|||
return None;
|
||||
}
|
||||
|
||||
// Functions marked with #[inline] are codegened with "internal"
|
||||
// linkage and are not exported unless marked with an extern
|
||||
// indicator
|
||||
if !Instance::mono(tcx, def_id.to_def_id()).def.generates_cgu_internal_copy(tcx)
|
||||
|| tcx.codegen_fn_attrs(def_id.to_def_id()).contains_extern_indicator()
|
||||
{
|
||||
Some(def_id)
|
||||
} else {
|
||||
None
|
||||
if Instance::mono(tcx, def_id.into()).def.requires_inline(tcx) {
|
||||
return None;
|
||||
}
|
||||
|
||||
if tcx.cross_crate_inlinable(def_id) { None } else { Some(def_id) }
|
||||
})
|
||||
.map(|def_id| {
|
||||
// We won't link right if this symbol is stripped during LTO.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue