@@ -555,20 +555,20 @@ impl<'a, 'tcx> ArgType<'tcx> {
555555 /// place for the original Rust type of this argument/return.
556556 /// Can be used for both storing formal arguments into Rust variables
557557 /// or results of call/invoke instructions into their destinations.
558- pub fn store ( & self , bcx : & Builder < ' a , ' tcx > , val : ValueRef , dst : PlaceRef < ' tcx > ) {
558+ pub fn store ( & self , bx : & Builder < ' a , ' tcx > , val : ValueRef , dst : PlaceRef < ' tcx > ) {
559559 if self . is_ignore ( ) {
560560 return ;
561561 }
562- let cx = bcx . cx ;
562+ let cx = bx . cx ;
563563 if self . is_indirect ( ) {
564- OperandValue :: Ref ( val, self . layout . align ) . store ( bcx , dst)
564+ OperandValue :: Ref ( val, self . layout . align ) . store ( bx , dst)
565565 } else if let PassMode :: Cast ( cast) = self . mode {
566566 // FIXME(eddyb): Figure out when the simpler Store is safe, clang
567567 // uses it for i16 -> {i8, i8}, but not for i24 -> {i8, i8, i8}.
568568 let can_store_through_cast_ptr = false ;
569569 if can_store_through_cast_ptr {
570- let cast_dst = bcx . pointercast ( dst. llval , cast. llvm_type ( cx) . ptr_to ( ) ) ;
571- bcx . store ( val, cast_dst, self . layout . align ) ;
570+ let cast_dst = bx . pointercast ( dst. llval , cast. llvm_type ( cx) . ptr_to ( ) ) ;
571+ bx . store ( val, cast_dst, self . layout . align ) ;
572572 } else {
573573 // The actual return type is a struct, but the ABI
574574 // adaptation code has cast it into some scalar type. The
@@ -587,42 +587,42 @@ impl<'a, 'tcx> ArgType<'tcx> {
587587 // We instead thus allocate some scratch space...
588588 let scratch_size = cast. size ( cx) ;
589589 let scratch_align = cast. align ( cx) ;
590- let llscratch = bcx . alloca ( cast. llvm_type ( cx) , "abi_cast" , scratch_align) ;
591- bcx . lifetime_start ( llscratch, scratch_size) ;
590+ let llscratch = bx . alloca ( cast. llvm_type ( cx) , "abi_cast" , scratch_align) ;
591+ bx . lifetime_start ( llscratch, scratch_size) ;
592592
593593 // ...where we first store the value...
594- bcx . store ( val, llscratch, scratch_align) ;
594+ bx . store ( val, llscratch, scratch_align) ;
595595
596596 // ...and then memcpy it to the intended destination.
597- base:: call_memcpy ( bcx ,
598- bcx . pointercast ( dst. llval , Type :: i8p ( cx) ) ,
599- bcx . pointercast ( llscratch, Type :: i8p ( cx) ) ,
597+ base:: call_memcpy ( bx ,
598+ bx . pointercast ( dst. llval , Type :: i8p ( cx) ) ,
599+ bx . pointercast ( llscratch, Type :: i8p ( cx) ) ,
600600 C_usize ( cx, self . layout . size . bytes ( ) ) ,
601601 self . layout . align . min ( scratch_align) ) ;
602602
603- bcx . lifetime_end ( llscratch, scratch_size) ;
603+ bx . lifetime_end ( llscratch, scratch_size) ;
604604 }
605605 } else {
606- OperandValue :: Immediate ( val) . store ( bcx , dst) ;
606+ OperandValue :: Immediate ( val) . store ( bx , dst) ;
607607 }
608608 }
609609
610- pub fn store_fn_arg ( & self , bcx : & Builder < ' a , ' tcx > , idx : & mut usize , dst : PlaceRef < ' tcx > ) {
610+ pub fn store_fn_arg ( & self , bx : & Builder < ' a , ' tcx > , idx : & mut usize , dst : PlaceRef < ' tcx > ) {
611611 if self . pad . is_some ( ) {
612612 * idx += 1 ;
613613 }
614614 let mut next = || {
615- let val = llvm:: get_param ( bcx . llfn ( ) , * idx as c_uint ) ;
615+ let val = llvm:: get_param ( bx . llfn ( ) , * idx as c_uint ) ;
616616 * idx += 1 ;
617617 val
618618 } ;
619619 match self . mode {
620620 PassMode :: Ignore => { } ,
621621 PassMode :: Pair ( ..) => {
622- OperandValue :: Pair ( next ( ) , next ( ) ) . store ( bcx , dst) ;
622+ OperandValue :: Pair ( next ( ) , next ( ) ) . store ( bx , dst) ;
623623 }
624624 PassMode :: Direct ( _) | PassMode :: Indirect ( _) | PassMode :: Cast ( _) => {
625- self . store ( bcx , next ( ) , dst) ;
625+ self . store ( bx , next ( ) , dst) ;
626626 }
627627 }
628628 }
0 commit comments