@@ -639,7 +639,7 @@ impl<'a, Ty> ArgAbi<'a, Ty> {
639
639
pub fn make_indirect ( & mut self ) {
640
640
match self . mode {
641
641
PassMode :: Direct ( _) | PassMode :: Pair ( _, _) => {
642
- self . mode = Self :: indirect_pass_mode ( & self . layout ) ;
642
+ self . make_indirect_force ( ) ;
643
643
}
644
644
PassMode :: Indirect { attrs : _, meta_attrs : _, on_stack : false } => {
645
645
// already indirect
@@ -649,6 +649,11 @@ impl<'a, Ty> ArgAbi<'a, Ty> {
649
649
}
650
650
}
651
651
652
+ /// Same as make_indirect, but doesn't check the current `PassMode`.
653
+ pub fn make_indirect_force ( & mut self ) {
654
+ self . mode = Self :: indirect_pass_mode ( & self . layout ) ;
655
+ }
656
+
652
657
/// Pass this argument indirectly, by placing it at a fixed stack offset.
653
658
/// This corresponds to the `byval` LLVM argument attribute.
654
659
/// This is only valid for sized arguments.
@@ -868,10 +873,10 @@ impl<'a, Ty> FnAbi<'a, Ty> {
868
873
}
869
874
"x86_64" => match abi {
870
875
spec:: abi:: Abi :: SysV64 { .. } => x86_64:: compute_abi_info ( cx, self ) ,
871
- spec:: abi:: Abi :: Win64 { .. } => x86_win64:: compute_abi_info ( self ) ,
876
+ spec:: abi:: Abi :: Win64 { .. } => x86_win64:: compute_abi_info ( cx , self ) ,
872
877
_ => {
873
878
if cx. target_spec ( ) . is_like_windows {
874
- x86_win64:: compute_abi_info ( self )
879
+ x86_win64:: compute_abi_info ( cx , self )
875
880
} else {
876
881
x86_64:: compute_abi_info ( cx, self )
877
882
}
@@ -895,7 +900,7 @@ impl<'a, Ty> FnAbi<'a, Ty> {
895
900
"csky" => csky:: compute_abi_info ( self ) ,
896
901
"mips" | "mips32r6" => mips:: compute_abi_info ( cx, self ) ,
897
902
"mips64" | "mips64r6" => mips64:: compute_abi_info ( cx, self ) ,
898
- "powerpc" => powerpc:: compute_abi_info ( self ) ,
903
+ "powerpc" => powerpc:: compute_abi_info ( cx , self ) ,
899
904
"powerpc64" => powerpc64:: compute_abi_info ( cx, self ) ,
900
905
"s390x" => s390x:: compute_abi_info ( cx, self ) ,
901
906
"msp430" => msp430:: compute_abi_info ( self ) ,
0 commit comments