Skip to content

Commit ea8eae3

Browse files
committed
---
yaml --- r: 1723 b: refs/heads/master c: e6b6d1b h: refs/heads/master i: 1721: f2f8e1d 1719: b45a6b7 v: v3
1 parent 65be26a commit ea8eae3

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
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: 95dc89f0124b85e289024c9ff96ae2e6f9f2b249
2+
refs/heads/master: e6b6d1b64589e077a8ba6e8c752eabd3cfec6755

trunk/src/comp/middle/trans.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3441,8 +3441,15 @@ fn trans_path(@block_ctxt cx, &ast.path p, &option.t[ast.def] dopt,
34413441

34423442
auto alloc_result = alloc_ty(cx, tag_ty);
34433443
auto lltagblob = alloc_result.val;
3444+
3445+
auto lltagty;
3446+
if (ty.type_has_dynamic_size(tag_ty)) {
3447+
lltagty = T_opaque_tag(cx.fcx.ccx.tn);
3448+
} else {
3449+
lltagty = type_of(cx.fcx.ccx, tag_ty);
3450+
}
34443451
auto lltagptr = alloc_result.bcx.build.PointerCast(
3445-
lltagblob, T_ptr(type_of(cx.fcx.ccx, tag_ty)));
3452+
lltagblob, T_ptr(lltagty));
34463453

34473454
auto lldiscrimptr = alloc_result.bcx.build.GEP(
34483455
lltagptr, vec(C_int(0), C_int(0)));

0 commit comments

Comments
 (0)