@@ -555,12 +555,33 @@ pub trait BuilderMethods<'a, 'tcx>:
555
555
/// Called for `StorageDead`
556
556
fn lifetime_end ( & mut self , ptr : Self :: Value , size : Size ) ;
557
557
558
+ /// "Finally codegen the call"
559
+ ///
560
+ /// ## Arguments
561
+ ///
562
+ /// The `fn_attrs`, `fn_abi`, and `instance` arguments are Options because they are advisory.
563
+ /// They relate to optional codegen enhancements like LLVM CFI, and do not affect ABI per se.
564
+ /// Any ABI-related transformations should be handled by different, earlier stages of codegen.
565
+ /// For instance, in the caller of `BuilderMethods::call`.
566
+ ///
567
+ /// This means that a codegen backend which disregards `fn_attrs`, `fn_abi`, and `instance`
568
+ /// should still do correct codegen, and code should not be miscompiled if they are omitted.
569
+ /// It is not a miscompilation in this sense if it fails to run under CFI, other sanitizers, or
570
+ /// in the context of other compiler-enhanced security features.
571
+ ///
572
+ /// The typical case that they are None is during the codegen of intrinsics and lang-items,
573
+ /// as those are "fake functions" with only a trivial ABI if any, et cetera.
574
+ ///
575
+ /// ## Return
576
+ ///
577
+ /// Must return the value the function will return so it can be written to the destination,
578
+ /// assuming the function does not explicitly pass the destination as a pointer in `args`.
558
579
fn call (
559
580
& mut self ,
560
581
llty : Self :: Type ,
561
582
fn_attrs : Option < & CodegenFnAttrs > ,
562
583
fn_abi : Option < & FnAbi < ' tcx , Ty < ' tcx > > > ,
563
- llfn : Self :: Value ,
584
+ fn_val : Self :: Value ,
564
585
args : & [ Self :: Value ] ,
565
586
funclet : Option < & Self :: Funclet > ,
566
587
instance : Option < Instance < ' tcx > > ,
0 commit comments