@@ -236,7 +236,7 @@ pub fn decl_rust_fn(ccx: &mut CrateContext, inputs: &[ty::t], output: ty::t,
236
236
_ => ( )
237
237
}
238
238
239
- let uses_outptr = type_of:: return_uses_outptr ( ccx. tcx , output) ;
239
+ let uses_outptr = type_of:: return_uses_outptr ( ccx, output) ;
240
240
let offset = if uses_outptr { 2 } else { 1 } ;
241
241
242
242
for ( i, & arg_ty) in inputs. iter ( ) . enumerate ( ) {
@@ -1117,13 +1117,13 @@ pub fn do_spill_noroot(cx: @mut Block, v: ValueRef) -> ValueRef {
1117
1117
1118
1118
pub fn spill_if_immediate ( cx : @mut Block , v : ValueRef , t : ty:: t ) -> ValueRef {
1119
1119
let _icx = push_ctxt ( "spill_if_immediate" ) ;
1120
- if type_is_immediate ( cx. tcx ( ) , t) { return do_spill ( cx, v, t) ; }
1120
+ if type_is_immediate ( cx. ccx ( ) , t) { return do_spill ( cx, v, t) ; }
1121
1121
return v;
1122
1122
}
1123
1123
1124
1124
pub fn load_if_immediate ( cx : @mut Block , v : ValueRef , t : ty:: t ) -> ValueRef {
1125
1125
let _icx = push_ctxt ( "load_if_immediate" ) ;
1126
- if type_is_immediate ( cx. tcx ( ) , t) { return Load ( cx, v) ; }
1126
+ if type_is_immediate ( cx. ccx ( ) , t) { return Load ( cx, v) ; }
1127
1127
return v;
1128
1128
}
1129
1129
@@ -1656,7 +1656,7 @@ pub fn mk_return_basic_block(llfn: ValueRef) -> BasicBlockRef {
1656
1656
// slot where the return value of the function must go.
1657
1657
pub fn make_return_pointer(fcx: @mut FunctionContext, output_type: ty::t) -> ValueRef {
1658
1658
unsafe {
1659
- if type_of::return_uses_outptr(fcx.ccx.tcx , output_type) {
1659
+ if type_of::return_uses_outptr(fcx.ccx, output_type) {
1660
1660
llvm::LLVMGetParam(fcx.llfn, 0)
1661
1661
} else {
1662
1662
let lloutputtype = type_of::type_of(fcx.ccx, output_type);
@@ -1696,7 +1696,7 @@ pub fn new_fn_ctxt_w_id(ccx: @mut CrateContext,
1696
1696
ty:: subst_tps ( ccx. tcx , substs. tys , substs. self_ty , output_type)
1697
1697
}
1698
1698
} ;
1699
- let uses_outptr = type_of:: return_uses_outptr ( ccx. tcx , substd_output_type) ;
1699
+ let uses_outptr = type_of:: return_uses_outptr ( ccx, substd_output_type) ;
1700
1700
let debug_context = debuginfo:: create_function_debug_context ( ccx, id, param_substs, llfndecl) ;
1701
1701
1702
1702
let fcx = @mut FunctionContext {
@@ -1808,7 +1808,7 @@ pub fn copy_args_to_allocas(fcx: @mut FunctionContext,
1808
1808
match fcx. llself {
1809
1809
Some ( slf) => {
1810
1810
let self_val = if slf. is_copy
1811
- && datum:: appropriate_mode ( bcx. tcx ( ) , slf. t ) . is_by_value ( ) {
1811
+ && datum:: appropriate_mode ( bcx. ccx ( ) , slf. t ) . is_by_value ( ) {
1812
1812
let tmp = BitCast ( bcx, slf. v , type_of ( bcx. ccx ( ) , slf. t ) ) ;
1813
1813
let alloc = alloc_ty ( bcx, slf. t , "__self" ) ;
1814
1814
Store ( bcx, tmp, alloc) ;
@@ -1838,7 +1838,7 @@ pub fn copy_args_to_allocas(fcx: @mut FunctionContext,
1838
1838
// This alloca should be optimized away by LLVM's mem-to-reg pass in
1839
1839
// the event it's not truly needed.
1840
1840
// only by value if immediate:
1841
- let llarg = if datum:: appropriate_mode ( bcx. tcx ( ) , arg_ty) . is_by_value ( ) {
1841
+ let llarg = if datum:: appropriate_mode ( bcx. ccx ( ) , arg_ty) . is_by_value ( ) {
1842
1842
let alloc = alloc_ty ( bcx, arg_ty, "__arg" ) ;
1843
1843
Store ( bcx, raw_llarg, alloc) ;
1844
1844
alloc
0 commit comments