aboutsummaryrefslogtreecommitdiff
path: root/src/comp
diff options
context:
space:
mode:
Diffstat (limited to 'src/comp')
-rw-r--r--src/comp/middle/trans.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs
index d9037c62..f105247b 100644
--- a/src/comp/middle/trans.rs
+++ b/src/comp/middle/trans.rs
@@ -2943,8 +2943,8 @@ fn trans_pat_match(@block_ctxt cx, @ast.pat pat, ValueRef llval,
}
case (ast.pat_tag(?id, ?subpats, ?vdef_opt, ?ann)) {
- auto lltagptr = cx.build.GEP(llval, vec(C_int(0), C_int(0)));
- auto lltag = cx.build.Load(lltagptr);
+ auto lldiscrimptr = cx.build.GEP(llval, vec(C_int(0), C_int(0)));
+ auto lldiscrim = cx.build.Load(lldiscrimptr);
auto vdef = option.get[ast.variant_def](vdef_opt);
auto variant_id = vdef._1;
@@ -2963,7 +2963,7 @@ fn trans_pat_match(@block_ctxt cx, @ast.pat pat, ValueRef llval,
auto matched_cx = new_sub_block_ctxt(cx, "matched_cx");
- auto lleq = cx.build.ICmp(lib.llvm.LLVMIntEQ, lltag,
+ auto lleq = cx.build.ICmp(lib.llvm.LLVMIntEQ, lldiscrim,
C_int(variant_tag));
cx.build.CondBr(lleq, matched_cx.llbb, next_cx.llbb);