X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Flibrustc%2Fmir%2Fmono.rs;h=475c77adebd106a98b1e90840fa7edee5bb0527b;hb=29951edbdfcb3e65e689e43c997a98d8aad5e273;hp=51ce575e51f3b61aaec5fdd72cfc51d831a1abab;hpb=cb6122db3fa22031c48ca6b332fc856b8d098027;p=rust.git diff --git a/src/librustc/mir/mono.rs b/src/librustc/mir/mono.rs index 51ce575e51f..475c77adebd 100644 --- a/src/librustc/mir/mono.rs +++ b/src/librustc/mir/mono.rs @@ -79,7 +79,7 @@ pub fn symbol_name(&self, tcx: TyCtxt<'tcx>) -> SymbolName { } pub fn instantiation_mode(&self, tcx: TyCtxt<'tcx>) -> InstantiationMode { - let inline_in_all_cgus = tcx + let generate_cgu_internal_copies = tcx .sess .opts .debugging_opts @@ -93,7 +93,7 @@ pub fn instantiation_mode(&self, tcx: TyCtxt<'tcx>) -> InstantiationMode { // If this function isn't inlined or otherwise has explicit // linkage, then we'll be creating a globally shared version. if self.explicit_linkage(tcx).is_some() - || !instance.def.requires_local(tcx) + || !instance.def.generates_cgu_internal_copy(tcx) || Some(instance.def_id()) == entry_def_id { return InstantiationMode::GloballyShared { may_conflict: false }; @@ -102,7 +102,7 @@ pub fn instantiation_mode(&self, tcx: TyCtxt<'tcx>) -> InstantiationMode { // At this point we don't have explicit linkage and we're an // inlined function. If we're inlining into all CGUs then we'll // be creating a local copy per CGU - if inline_in_all_cgus { + if generate_cgu_internal_copies { return InstantiationMode::LocalCopy; }