@@ -155,7 +155,7 @@ pub(crate) fn codegen_const_value<'tcx>(
155155 fx. bcx . ins ( ) . global_value ( fx. pointer_type , local_data_id)
156156 }
157157 }
158- GlobalAlloc :: Function ( instance) => {
158+ GlobalAlloc :: Function { instance, .. } => {
159159 let func_id = crate :: abi:: import_function ( fx. tcx , fx. module , instance) ;
160160 let local_func_id =
161161 fx. module . declare_func_in_func ( func_id, & mut fx. bcx . func ) ;
@@ -351,7 +351,9 @@ fn define_all_allocs(tcx: TyCtxt<'_>, module: &mut dyn Module, cx: &mut Constant
351351 TodoItem :: Alloc ( alloc_id) => {
352352 let alloc = match tcx. global_alloc ( alloc_id) {
353353 GlobalAlloc :: Memory ( alloc) => alloc,
354- GlobalAlloc :: Function ( _) | GlobalAlloc :: Static ( _) | GlobalAlloc :: VTable ( ..) => {
354+ GlobalAlloc :: Function { .. }
355+ | GlobalAlloc :: Static ( _)
356+ | GlobalAlloc :: VTable ( ..) => {
355357 unreachable ! ( )
356358 }
357359 } ;
@@ -443,7 +445,7 @@ fn define_all_allocs(tcx: TyCtxt<'_>, module: &mut dyn Module, cx: &mut Constant
443445
444446 let reloc_target_alloc = tcx. global_alloc ( alloc_id) ;
445447 let data_id = match reloc_target_alloc {
446- GlobalAlloc :: Function ( instance) => {
448+ GlobalAlloc :: Function { instance, .. } => {
447449 assert_eq ! ( addend, 0 ) ;
448450 let func_id =
449451 crate :: abi:: import_function ( tcx, module, instance. polymorphize ( tcx) ) ;
@@ -593,6 +595,7 @@ pub(crate) fn mir_operand_get_const_val<'tcx>(
593595 {
594596 return None ;
595597 }
598+ TerminatorKind :: TailCall { .. } => return None ,
596599 TerminatorKind :: Call { .. } => { }
597600 }
598601 }
0 commit comments