Account for #[link_name] intrinsics shims

This commit is contained in:
Ben Kimock 2024-03-19 13:18:23 -04:00
parent 5f4f2526b8
commit 82717ab877

View File

@ -63,6 +63,7 @@ pub fn is_call_from_compiler_builtins_to_upstream_monomorphization<'tcx>(
) -> bool {
!instance.def_id().is_local()
&& tcx.is_compiler_builtins(LOCAL_CRATE)
&& tcx.codegen_fn_attrs(instance.def_id()).link_name.is_none()
&& !should_codegen_locally(tcx, &instance)
}