Skip to content

Commit ba2e04f

Browse files
committed
Rename confusing usage of "lltag" to "lldiscrim" in trans_pat_match()
1 parent ff15a93 commit ba2e04f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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)