Skip to content

Commit 1d5ca87

Browse files
committed
---
yaml --- r: 30108 b: refs/heads/incoming c: 62be878 h: refs/heads/master v: v3
1 parent 00c5652 commit 1d5ca87

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: d324a424d8f84b1eb049b12cf34182bda91b0024
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: d0c6ce338884ee21843f4b40bf6bf18d222ce5df
9-
refs/heads/incoming: ff9151fa55e4e81c0cbaa7181eb672b2df6b53f6
9+
refs/heads/incoming: 62be878ed1715650f080c3b113a85f73e7af0973
1010
refs/heads/dist-snap: 2f32a1581f522e524009138b33b1c7049ced668d
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/incoming/src/rustc/middle/trans/foreign.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -937,9 +937,12 @@ fn trans_intrinsic(ccx: @crate_ctxt, decl: ValueRef, item: @ast::foreign_item,
937937
ty_to_str(ccx.tcx, substs.tys[1]), out_sz));
938938
}
939939
if !ty::type_is_nil(substs.tys[1]) {
940-
let cast = PointerCast(bcx, get_param(decl, first_real_arg),
941-
T_ptr(llout_ty));
942-
Store(bcx, Load(bcx, cast), fcx.llretptr);
940+
// NB: Do not use a Load and Store here. This causes massive code
941+
// bloat when reinterpret_cast is used on large structural types.
942+
let llretptr = PointerCast(bcx, fcx.llretptr, T_ptr(T_i8()));
943+
let llcast = get_param(decl, first_real_arg);
944+
let llcast = PointerCast(bcx, llcast, T_ptr(T_i8()));
945+
call_memmove(bcx, llretptr, llcast, llsize_of(ccx, lltp_ty));
943946
}
944947
}
945948
~"addr_of" => {

0 commit comments

Comments
 (0)