@@ -779,26 +779,31 @@ impl RiscvInterruptKind {
|
779 | 779 | /// Metadata describing how the arguments to a native function |
780 | 780 | /// should be passed in order to respect the native ABI. |
781 | 781 | /// |
| 782 | +/// The signature represented by this type may not match the MIR function signature. |
| 783 | +/// Certain attributes, like `#[track_caller]` can introduce additional arguments, which are present in [`FnAbi`], but not in `FnSig`. |
| 784 | +/// While this difference is rarely relevant, it should still be kept in mind. |
| 785 | +/// |
782 | 786 | /// I will do my best to describe this structure, but these |
783 | 787 | /// comments are reverse-engineered and may be inaccurate. -NDM |
784 | 788 | #[derive(Clone, PartialEq, Eq, Hash, HashStable_Generic)] |
785 | 789 | pub struct FnAbi<'a, Ty> { |
786 | | -/// The LLVM types of each argument. |
| 790 | +/// The type, layout, and information about how each argument is passed. |
787 | 791 | pub args: Box<[ArgAbi<'a, Ty>]>, |
788 | 792 | |
789 | | -/// LLVM return type. |
| 793 | +/// The layout, type, and the way a value is returned from this function. |
790 | 794 | pub ret: ArgAbi<'a, Ty>, |
791 | 795 | |
| 796 | +/// Marks this function as variadic (accepting a variable number of arguments). |
792 | 797 | pub c_variadic: bool, |
793 | 798 | |
794 | 799 | /// The count of non-variadic arguments. |
795 | 800 | /// |
796 | 801 | /// Should only be different from args.len() when c_variadic is true. |
797 | 802 | /// This can be used to know whether an argument is variadic or not. |
798 | 803 | pub fixed_count: u32, |
799 | | - |
| 804 | + /// The calling convention of this function. |
800 | 805 | pub conv: Conv, |
801 | | - |
| 806 | + /// Indicates if an unwind may happen across a call to this function. |
802 | 807 | pub can_unwind: bool, |
803 | 808 | } |
804 | 809 | |
|