@@ -632,7 +632,7 @@ impl<'a, Ty> ArgAbi<'a, Ty> {
632632 pub fn make_indirect ( & mut self ) {
633633 match self . mode {
634634 PassMode :: Direct ( _) | PassMode :: Pair ( _, _) => {
635- self . mode = Self :: indirect_pass_mode ( & self . layout ) ;
635+ self . make_indirect_force ( ) ;
636636 }
637637 PassMode :: Indirect { attrs : _, meta_attrs : _, on_stack : false } => {
638638 // already indirect
@@ -642,6 +642,11 @@ impl<'a, Ty> ArgAbi<'a, Ty> {
642642 }
643643 }
644644
645+ /// Same as make_indirect, but doesn't check the current `PassMode`.
646+ pub fn make_indirect_force ( & mut self ) {
647+ self . mode = Self :: indirect_pass_mode ( & self . layout ) ;
648+ }
649+
645650 /// Pass this argument indirectly, by placing it at a fixed stack offset.
646651 /// This corresponds to the `byval` LLVM argument attribute.
647652 /// This is only valid for sized arguments.
@@ -860,10 +865,10 @@ impl<'a, Ty> FnAbi<'a, Ty> {
860865 }
861866 "x86_64" => match abi {
862867 spec:: abi:: Abi :: SysV64 { .. } => x86_64:: compute_abi_info ( cx, self ) ,
863- spec:: abi:: Abi :: Win64 { .. } => x86_win64:: compute_abi_info ( self ) ,
868+ spec:: abi:: Abi :: Win64 { .. } => x86_win64:: compute_abi_info ( cx , self ) ,
864869 _ => {
865870 if cx. target_spec ( ) . is_like_windows {
866- x86_win64:: compute_abi_info ( self )
871+ x86_win64:: compute_abi_info ( cx , self )
867872 } else {
868873 x86_64:: compute_abi_info ( cx, self )
869874 }
@@ -887,7 +892,7 @@ impl<'a, Ty> FnAbi<'a, Ty> {
887892 "csky" => csky:: compute_abi_info ( self ) ,
888893 "mips" | "mips32r6" => mips:: compute_abi_info ( cx, self ) ,
889894 "mips64" | "mips64r6" => mips64:: compute_abi_info ( cx, self ) ,
890- "powerpc" => powerpc:: compute_abi_info ( self ) ,
895+ "powerpc" => powerpc:: compute_abi_info ( cx , self ) ,
891896 "powerpc64" => powerpc64:: compute_abi_info ( cx, self ) ,
892897 "s390x" => s390x:: compute_abi_info ( cx, self ) ,
893898 "msp430" => msp430:: compute_abi_info ( self ) ,
0 commit comments