Skip to content

Commit 0197237

Browse files
committed
---
yaml --- r: 1578 b: refs/heads/master c: ba2e04f h: refs/heads/master v: v3
1 parent f5b0014 commit 0197237

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

[refs]

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: ff15a93d952f0456c8e88d320bb1be27b7801443
2+
refs/heads/master: ba2e04f271ca4015a3fb22dd01543ab9dc5d6543

trunk/src/comp/middle/trans.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -2943,8 +2943,8 @@ fn trans_pat_match(@block_ctxt cx, @ast.pat pat, ValueRef llval,
29432943
}
29442944

29452945
case (ast.pat_tag(?id, ?subpats, ?vdef_opt, ?ann)) {
2946-
auto lltagptr = cx.build.GEP(llval, vec(C_int(0), C_int(0)));
2947-
auto lltag = cx.build.Load(lltagptr);
2946+
auto lldiscrimptr = cx.build.GEP(llval, vec(C_int(0), C_int(0)));
2947+
auto lldiscrim = cx.build.Load(lldiscrimptr);
29482948

29492949
auto vdef = option.get[ast.variant_def](vdef_opt);
29502950
auto variant_id = vdef._1;
@@ -2963,7 +2963,7 @@ fn trans_pat_match(@block_ctxt cx, @ast.pat pat, ValueRef llval,
29632963

29642964
auto matched_cx = new_sub_block_ctxt(cx, "matched_cx");
29652965

2966-
auto lleq = cx.build.ICmp(lib.llvm.LLVMIntEQ, lltag,
2966+
auto lleq = cx.build.ICmp(lib.llvm.LLVMIntEQ, lldiscrim,
29672967
C_int(variant_tag));
29682968
cx.build.CondBr(lleq, matched_cx.llbb, next_cx.llbb);
29692969

0 commit comments

Comments
 (0)