@@ -1397,12 +1397,12 @@ impl<'a, 'll, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
13971397 fn call (
13981398 & mut self ,
13991399 llty : & ' ll Type ,
1400- fn_call_attrs : Option < & CodegenFnAttrs > ,
1400+ caller_attrs : Option < & CodegenFnAttrs > ,
14011401 fn_abi : Option < & FnAbi < ' tcx , Ty < ' tcx > > > ,
14021402 llfn : & ' ll Value ,
14031403 args : & [ & ' ll Value ] ,
14041404 funclet : Option < & Funclet < ' ll > > ,
1405- instance : Option < Instance < ' tcx > > ,
1405+ callee_instance : Option < Instance < ' tcx > > ,
14061406 ) -> & ' ll Value {
14071407 debug ! ( "call {:?} with args ({:?})" , llfn, args) ;
14081408
@@ -1414,10 +1414,10 @@ impl<'a, 'll, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
14141414 }
14151415
14161416 // Emit CFI pointer type membership test
1417- self . cfi_type_test ( fn_call_attrs , fn_abi, instance , llfn) ;
1417+ self . cfi_type_test ( caller_attrs , fn_abi, callee_instance , llfn) ;
14181418
14191419 // Emit KCFI operand bundle
1420- let kcfi_bundle = self . kcfi_operand_bundle ( fn_call_attrs , fn_abi, instance , llfn) ;
1420+ let kcfi_bundle = self . kcfi_operand_bundle ( caller_attrs , fn_abi, callee_instance , llfn) ;
14211421 if let Some ( kcfi_bundle) = kcfi_bundle. as_ref ( ) . map ( |b| b. as_ref ( ) ) {
14221422 bundles. push ( kcfi_bundle) ;
14231423 }
@@ -1435,17 +1435,17 @@ impl<'a, 'll, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
14351435 )
14361436 } ;
14371437
1438- if let Some ( instance ) = instance {
1438+ if let Some ( callee_instance ) = callee_instance {
14391439 // Attributes on the function definition being called
1440- let fn_defn_attrs = self . cx . tcx . codegen_fn_attrs ( instance . def_id ( ) ) ;
1441- if let Some ( fn_call_attrs ) = fn_call_attrs
1440+ let callee_attrs = self . cx . tcx . codegen_fn_attrs ( callee_instance . def_id ( ) ) ;
1441+ if let Some ( caller_attrs ) = caller_attrs
14421442 // If there is an inline attribute and a target feature that matches
14431443 // we will add the attribute to the callsite otherwise we'll omit
14441444 // this and not add the attribute to prevent soundness issues.
1445- && let Some ( inlining_rule) = attributes:: inline_attr ( & self . cx , self . cx . tcx , instance )
1445+ && let Some ( inlining_rule) = attributes:: inline_attr ( & self . cx , self . cx . tcx , callee_instance )
14461446 && self . cx . tcx . is_target_feature_call_safe (
1447- & fn_defn_attrs . target_features ,
1448- & fn_call_attrs . target_features . iter ( ) . cloned ( ) . chain (
1447+ & callee_attrs . target_features ,
1448+ & caller_attrs . target_features . iter ( ) . cloned ( ) . chain (
14491449 self . cx . tcx . sess . target_features . iter ( ) . map ( |feat| TargetFeature {
14501450 name : * feat,
14511451 kind : TargetFeatureKind :: Implied ,
@@ -1470,14 +1470,15 @@ impl<'a, 'll, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
14701470 fn tail_call (
14711471 & mut self ,
14721472 llty : Self :: Type ,
1473- fn_attrs : Option < & CodegenFnAttrs > ,
1473+ caller_attrs : Option < & CodegenFnAttrs > ,
14741474 fn_abi : & FnAbi < ' tcx , Ty < ' tcx > > ,
14751475 llfn : Self :: Value ,
14761476 args : & [ Self :: Value ] ,
14771477 funclet : Option < & Self :: Funclet > ,
1478- instance : Option < Instance < ' tcx > > ,
1478+ callee_instance : Option < Instance < ' tcx > > ,
14791479 ) {
1480- let call = self . call ( llty, fn_attrs, Some ( fn_abi) , llfn, args, funclet, instance) ;
1480+ let call =
1481+ self . call ( llty, caller_attrs, Some ( fn_abi) , llfn, args, funclet, callee_instance) ;
14811482 llvm:: LLVMSetTailCallKind ( call, llvm:: TailCallKind :: MustTail ) ;
14821483
14831484 match & fn_abi. ret . mode {
0 commit comments