@@ -610,34 +610,6 @@ fn iter_structural_ty(cx: block, av: ValueRef, t: ty::t,
610
610
return cx;
611
611
}
612
612
613
- fn trans_compare( cx: block, op: ast:: binop, lhs: ValueRef ,
614
- _lhs_t: ty:: t, rhs: ValueRef , rhs_t: ty:: t) -> Result {
615
- let _icx = cx. insn_ctxt( "trans_compare" ) ;
616
- if ty:: type_is_scalar ( rhs_t) {
617
- let rs = compare_scalar_types ( cx, lhs, rhs, rhs_t, op) ;
618
- return rslt ( rs. bcx , rs. val ) ;
619
- }
620
-
621
- // Determine the operation we need.
622
- let llop = {
623
- match op {
624
- ast:: eq | ast:: ne => C_u8 ( abi:: cmp_glue_op_eq) ,
625
- ast:: lt | ast:: ge => C_u8 ( abi:: cmp_glue_op_lt) ,
626
- ast:: le | ast:: gt => C_u8 ( abi:: cmp_glue_op_le) ,
627
- _ => cx. tcx ( ) . sess . bug ( ~"trans_compare got non-comparison-op")
628
- }
629
- } ;
630
-
631
- let cmpval = glue:: call_cmp_glue ( cx, lhs, rhs, rhs_t, llop) ;
632
-
633
- // Invert the result if necessary.
634
- match op {
635
- ast:: eq | ast:: lt | ast:: le => rslt ( cx, cmpval) ,
636
- ast:: ne | ast:: ge | ast:: gt => rslt ( cx, Not ( cx, cmpval) ) ,
637
- _ => cx. tcx ( ) . sess . bug ( ~"trans_compare got non-comparison-op")
638
- }
639
- }
640
-
641
613
fn cast_shift_expr_rhs( cx: block, op: ast:: binop,
642
614
lhs: ValueRef , rhs: ValueRef ) -> ValueRef {
643
615
cast_shift_rhs( op, lhs, rhs,
0 commit comments