Skip to content

Commit

Permalink
auto merge of #7069 : dotdash/rust/cast_combine, r=graydon
Browse files Browse the repository at this point in the history
Shaves off a percent or so from the LLVM passes for librustc.
  • Loading branch information
bors committed Jun 12, 2013
2 parents 8761b1f + f526434 commit 7033dfc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/librustc/middle/trans/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,8 @@ pub fn opaque_box_body(bcx: block,
boxptr: ValueRef) -> ValueRef {
let _icx = bcx.insn_ctxt("opaque_box_body");
let ccx = bcx.ccx();
let boxptr = PointerCast(bcx, boxptr, T_ptr(T_box_header(ccx)));
let bodyptr = GEPi(bcx, boxptr, [1u]);
PointerCast(bcx, bodyptr, T_ptr(type_of(ccx, body_t)))
let boxptr = PointerCast(bcx, boxptr, T_ptr(T_box(ccx, type_of(ccx, body_t))));
GEPi(bcx, boxptr, [0u, abi::box_field_body])
}

// malloc_raw_dyn: allocates a box to contain a given type, but with a
Expand Down

0 comments on commit 7033dfc

Please sign in to comment.