Skip to content

Commit 764f5df

Browse files
committed
---
yaml --- r: 2919 b: refs/heads/master c: ba377c0 h: refs/heads/master i: 2917: 225f026 2915: 29670c9 2911: 992e3b9 v: v3
1 parent 88cde35 commit 764f5df

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-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: 468786e36d5ab35afb54b60bc1d6147ba0db8733
2+
refs/heads/master: ba377c043d72d1740361593b69efda94c81eac85

trunk/src/comp/middle/trans.rs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5121,8 +5121,6 @@ fn trans_bind(&@block_ctxt cx, &@ast::expr f,
51215121
ret res(bcx, pair_v);
51225122
}
51235123
}
5124-
5125-
fail; // sadly needed b/c the compiler doesn't know yet that unimpl fails
51265124
}
51275125

51285126
fn trans_arg_expr(&@block_ctxt cx,
@@ -5168,8 +5166,15 @@ fn trans_arg_expr(&@block_ctxt cx,
51685166
if (arg.mode != ty::mo_alias) {
51695167
bcx = take_ty(bcx, val, e_ty).bcx;
51705168
}
5171-
5172-
if (ty::type_contains_params(cx.fcx.lcx.ccx.tcx, arg.ty)) {
5169+
5170+
if (ty::type_is_bot(cx.fcx.lcx.ccx.tcx, e_ty)) {
5171+
// For values of type _|_, we generate an
5172+
// "undef" value, as such a value should never
5173+
// be inspected. It's important for the value
5174+
// to have type lldestty0 (the callee's expected type).
5175+
val = llvm::LLVMGetUndef(lldestty0);
5176+
}
5177+
else if (ty::type_contains_params(cx.fcx.lcx.ccx.tcx, arg.ty)) {
51735178
auto lldestty = lldestty0;
51745179
if (arg.mode == ty::mo_val) {
51755180
// FIXME: we'd prefer to use &&, but rustboot doesn't like it

0 commit comments

Comments
 (0)