diff options
Diffstat (limited to 'src/comp')
| -rw-r--r-- | src/comp/middle/trans.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs index 9f75d0d1c77..7435c30c5bf 100644 --- a/src/comp/middle/trans.rs +++ b/src/comp/middle/trans.rs @@ -3700,7 +3700,13 @@ fn load_if_immediate(cx: @block_ctxt, v: ValueRef, t: ty::t) -> ValueRef { fn trans_log(lvl: @ast::expr, cx: @block_ctxt, e: @ast::expr) -> @block_ctxt { let ccx = bcx_ccx(cx); let lcx = cx.fcx.lcx; + let tcx = ccx.tcx; let modname = str::connect(lcx.module_path, "::"); + + if ty::type_is_bot(tcx, ty::expr_ty(tcx, lvl)) { + ret trans_expr(cx, lvl, ignore); + } + let global = if lcx.ccx.module_data.contains_key(modname) { lcx.ccx.module_data.get(modname) } else { |
