@@ -224,21 +224,21 @@ impl<'ll, 'tcx> IntrinsicCallBuilderMethods<'tcx> for Builder<'_, 'll, 'tcx> {
224
224
} ;
225
225
226
226
// Get source, diff, and attrs
227
- let source_id = match fn_args. into_type_list ( tcx) [ 0 ] . kind ( ) {
228
- ty:: FnDef ( def_id, _ ) => def_id,
227
+ let ( source_id, source_args ) = match fn_args. into_type_list ( tcx) [ 0 ] . kind ( ) {
228
+ ty:: FnDef ( def_id, source_params ) => ( def_id, source_params ) ,
229
229
_ => bug ! ( "invalid args" ) ,
230
230
} ;
231
- let fn_source = Instance :: mono ( tcx , * source_id) ;
231
+ let fn_source = Instance :: new_raw ( * source_id, source_args ) ;
232
232
let source_symbol =
233
233
symbol_name_for_instance_in_crate ( tcx, fn_source. clone ( ) , LOCAL_CRATE ) ;
234
234
let fn_to_diff: Option < & ' ll llvm:: Value > = self . cx . get_function ( & source_symbol) ;
235
235
let Some ( fn_to_diff) = fn_to_diff else { bug ! ( "could not find source function" ) } ;
236
236
237
- let diff_id = match fn_args. into_type_list ( tcx) [ 1 ] . kind ( ) {
238
- ty:: FnDef ( def_id, _ ) => def_id,
237
+ let ( diff_id, diff_args ) = match fn_args. into_type_list ( tcx) [ 1 ] . kind ( ) {
238
+ ty:: FnDef ( def_id, diff_args ) => ( def_id, diff_args ) ,
239
239
_ => bug ! ( "invalid args" ) ,
240
240
} ;
241
- let fn_diff = Instance :: mono ( tcx , * diff_id) ;
241
+ let fn_diff = Instance :: new_raw ( * diff_id, diff_args ) ;
242
242
let diff_symbol =
243
243
symbol_name_for_instance_in_crate ( tcx, fn_diff. clone ( ) , LOCAL_CRATE ) ;
244
244
0 commit comments