@@ -212,7 +212,7 @@ impl ArgTypeExt<'ll, 'tcx> for ArgType<'tcx, Ty<'tcx>> {
212212 // uses it for i16 -> {i8, i8}, but not for i24 -> {i8, i8, i8}.
213213 let can_store_through_cast_ptr = false ;
214214 if can_store_through_cast_ptr {
215- let cast_ptr_llty = bx. cx ( ) . type_ptr_to ( cast. llvm_type ( bx. cx ( ) ) ) ;
215+ let cast_ptr_llty = bx. type_ptr_to ( cast. llvm_type ( bx) ) ;
216216 let cast_dst = bx. pointercast ( dst. llval , cast_ptr_llty) ;
217217 bx. store ( val, cast_dst, self . layout . align . abi ) ;
218218 } else {
@@ -231,9 +231,9 @@ impl ArgTypeExt<'ll, 'tcx> for ArgType<'tcx, Ty<'tcx>> {
231231 // bitcasting to the struct type yields invalid cast errors.
232232
233233 // We instead thus allocate some scratch space...
234- let scratch_size = cast. size ( bx. cx ( ) ) ;
235- let scratch_align = cast. align ( bx. cx ( ) ) ;
236- let llscratch = bx. alloca ( cast. llvm_type ( bx. cx ( ) ) , "abi_cast" , scratch_align) ;
234+ let scratch_size = cast. size ( bx) ;
235+ let scratch_align = cast. align ( bx) ;
236+ let llscratch = bx. alloca ( cast. llvm_type ( bx) , "abi_cast" , scratch_align) ;
237237 bx. lifetime_start ( llscratch, scratch_size) ;
238238
239239 // ...where we first store the value...
@@ -245,7 +245,7 @@ impl ArgTypeExt<'ll, 'tcx> for ArgType<'tcx, Ty<'tcx>> {
245245 self . layout . align . abi ,
246246 llscratch,
247247 scratch_align,
248- bx. cx ( ) . const_usize ( self . layout . size . bytes ( ) ) ,
248+ bx. const_usize ( self . layout . size . bytes ( ) ) ,
249249 MemFlags :: empty ( )
250250 ) ;
251251
@@ -299,7 +299,7 @@ impl ArgTypeMethods<'tcx> for Builder<'a, 'll, 'tcx> {
299299 ty. store ( self , val, dst)
300300 }
301301 fn memory_ty ( & self , ty : & ArgType < ' tcx , Ty < ' tcx > > ) -> & ' ll Type {
302- ty. memory_ty ( self . cx ( ) )
302+ ty. memory_ty ( self )
303303 }
304304}
305305
@@ -780,7 +780,7 @@ impl<'tcx> FnTypeExt<'tcx> for FnType<'tcx, Ty<'tcx>> {
780780 // by the LLVM verifier.
781781 if let layout:: Int ( ..) = scalar. value {
782782 if !scalar. is_bool ( ) {
783- let range = scalar. valid_range_exclusive ( bx. cx ( ) ) ;
783+ let range = scalar. valid_range_exclusive ( bx) ;
784784 if range. start != range. end {
785785 bx. range_metadata ( callsite, range) ;
786786 }
0 commit comments