Skip to content

Commit ca5be83

Browse files
committed
---
yaml --- r: 1492 b: refs/heads/master c: 5ebb91f h: refs/heads/master v: v3
1 parent b471059 commit ca5be83

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 21e42ad88a388d2178770fe2ee046c4f30148da9
2+
refs/heads/master: 5ebb91f24d84391f6c821c54fb8c497964eac6c3

trunk/src/comp/middle/trans.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1596,8 +1596,10 @@ fn iter_structural_ty_full(@block_ctxt cx,
15961596
case (ty.ty_tup(?args)) {
15971597
let int i = 0;
15981598
for (@ty.t arg in args) {
1599-
auto elt_a = r.bcx.build.GEP(av, vec(C_int(0), C_int(i)));
1600-
auto elt_b = r.bcx.build.GEP(bv, vec(C_int(0), C_int(i)));
1599+
r = GEP_tup_like(r.bcx, t, av, vec(0, i));
1600+
auto elt_a = r.val;
1601+
r = GEP_tup_like(r.bcx, t, bv, vec(0, i));
1602+
auto elt_b = r.val;
16011603
r = f(r.bcx,
16021604
load_scalar_or_boxed(r.bcx, elt_a, arg),
16031605
load_scalar_or_boxed(r.bcx, elt_b, arg),
@@ -1608,8 +1610,10 @@ fn iter_structural_ty_full(@block_ctxt cx,
16081610
case (ty.ty_rec(?fields)) {
16091611
let int i = 0;
16101612
for (ty.field fld in fields) {
1611-
auto llfld_a = r.bcx.build.GEP(av, vec(C_int(0), C_int(i)));
1612-
auto llfld_b = r.bcx.build.GEP(bv, vec(C_int(0), C_int(i)));
1613+
r = GEP_tup_like(r.bcx, t, av, vec(0, i));
1614+
auto llfld_a = r.val;
1615+
r = GEP_tup_like(r.bcx, t, bv, vec(0, i));
1616+
auto llfld_b = r.val;
16131617
r = f(r.bcx,
16141618
load_scalar_or_boxed(r.bcx, llfld_a, fld.ty),
16151619
load_scalar_or_boxed(r.bcx, llfld_b, fld.ty),

0 commit comments

Comments
 (0)