@@ -185,7 +185,7 @@ impl<'a, 'gcc, 'tcx> Builder<'a, 'gcc, 'tcx> {
185
185
Cow :: Owned ( casted_args)
186
186
}
187
187
188
- fn check_ptr_call < ' b > ( & mut self , _typ : & str , func_ptr : RValue < ' gcc > , args : & ' b [ RValue < ' gcc > ] ) -> Cow < ' b , [ RValue < ' gcc > ] > {
188
+ fn check_ptr_call < ' b > ( & mut self , func_ptr : RValue < ' gcc > , args : & ' b [ RValue < ' gcc > ] ) -> Cow < ' b , [ RValue < ' gcc > ] > {
189
189
let mut all_args_match = true ;
190
190
let mut param_types = vec ! [ ] ;
191
191
let gcc_func = func_ptr. get_type ( ) . dyncast_function_ptr_type ( ) . expect ( "function ptr" ) ;
@@ -256,7 +256,7 @@ impl<'a, 'gcc, 'tcx> Builder<'a, 'gcc, 'tcx> {
256
256
self . block . get_function ( )
257
257
}
258
258
259
- fn function_call ( & mut self , func : RValue < ' gcc > , args : & [ RValue < ' gcc > ] , _funclet : Option < & Funclet > ) -> RValue < ' gcc > {
259
+ fn function_call ( & mut self , func : RValue < ' gcc > , args : & [ RValue < ' gcc > ] ) -> RValue < ' gcc > {
260
260
// TODO(antoyo): remove when the API supports a different type for functions.
261
261
let func: Function < ' gcc > = self . cx . rvalue_as_function ( func) ;
262
262
let args = self . check_call ( "call" , func, args) ;
@@ -299,7 +299,7 @@ impl<'a, 'gcc, 'tcx> Builder<'a, 'gcc, 'tcx> {
299
299
llvm:: adjust_intrinsic_arguments ( & self , gcc_func, args. into ( ) , & func_name, original_function_name)
300
300
} ;
301
301
let args_adjusted = args. len ( ) != previous_arg_count;
302
- let args = self . check_ptr_call ( "call" , func_ptr, & * args) ;
302
+ let args = self . check_ptr_call ( func_ptr, & * args) ;
303
303
304
304
// gccjit requires to use the result of functions, even when it's not used.
305
305
// That's why we assign the result to a local or call add_eval().
@@ -333,7 +333,7 @@ impl<'a, 'gcc, 'tcx> Builder<'a, 'gcc, 'tcx> {
333
333
}
334
334
}
335
335
336
- pub fn overflow_call ( & self , func : Function < ' gcc > , args : & [ RValue < ' gcc > ] , _funclet : Option < & Funclet > ) -> RValue < ' gcc > {
336
+ pub fn overflow_call ( & self , func : Function < ' gcc > , args : & [ RValue < ' gcc > ] ) -> RValue < ' gcc > {
337
337
// gccjit requires to use the result of functions, even when it's not used.
338
338
// That's why we assign the result to a local.
339
339
let return_type = self . context . new_type :: < bool > ( ) ;
@@ -1386,7 +1386,7 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> {
1386
1386
// FIXME(antoyo): remove when having a proper API.
1387
1387
let gcc_func = unsafe { std:: mem:: transmute ( func) } ;
1388
1388
let call = if self . functions . borrow ( ) . values ( ) . any ( |value| * value == gcc_func) {
1389
- self . function_call ( func, args, funclet )
1389
+ self . function_call ( func, args)
1390
1390
}
1391
1391
else {
1392
1392
// If it's a not function that was defined, it's a function pointer.
0 commit comments