Skip to content

Commit 9c08b5e

Browse files
committed
---
yaml --- r: 3392 b: refs/heads/master c: 663aa76 h: refs/heads/master v: v3
1 parent 7114796 commit 9c08b5e

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
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: dfccd5a138bfd7b20edcfd9ec1c7fae1eff3480c
2+
refs/heads/master: 663aa7663533b6b1cbeb2229c95b4bbde1a5d18e

trunk/src/comp/middle/trans.rs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2984,9 +2984,17 @@ fn call_cmp_glue(&@block_ctxt cx, ValueRef lhs, ValueRef rhs, &ty::t t,
29842984
r.bcx.build.GEP(r.val,
29852985
[C_int(0), C_int(abi::tydesc_field_first_param)]);
29862986
lltydescs = r.bcx.build.Load(lltydescs);
2987-
auto llfnptr =
2988-
r.bcx.build.GEP(r.val, [C_int(0), C_int(abi::tydesc_field_cmp_glue)]);
2989-
auto llfn = r.bcx.build.Load(llfnptr);
2987+
2988+
auto llfn;
2989+
alt (ti) {
2990+
case (none) {
2991+
auto llfnptr = r.bcx.build.GEP(r.val, [C_int(0),
2992+
C_int(abi::tydesc_field_cmp_glue)]);
2993+
llfn = r.bcx.build.Load(llfnptr);
2994+
}
2995+
case (some(?sti)) { llfn = option::get(sti.cmp_glue); }
2996+
}
2997+
29902998
auto llcmpresultptr = alloca(r.bcx, T_i1());
29912999
let vec[ValueRef] llargs =
29923000
[llcmpresultptr, r.bcx.fcx.lltaskptr, C_null(T_ptr(T_nil())),

0 commit comments

Comments
 (0)