pub fn trans_case<'blk, 'tcx>(bcx: Block<'blk, 'tcx>, r: &Repr, discr: Disr)
                              -> ValueRef {
    match *r {
        CEnum(ity, ..) => {
            C_integral(ll_inttype(bcx.ccx(), ity), discr.0, true)
        }
        General(ity, _) => {
            C_integral(ll_inttype(bcx.ccx(), ity), discr.0, true)
        }
        Univariant(..) | UntaggedUnion(..) => {
            bug!("no cases for univariants, structs or unions")
        }
        RawNullablePointer { .. } |
        StructWrappedNullablePointer { .. } => {
            assert!(discr == Disr(0) || discr == Disr(1));
            C_bool(bcx.ccx(), discr != Disr(0))
        }
    }
}
/// Yield information about how to dispatch a case of the
/// discriminant-like value returned by `trans_switch`.
///
/// This should ideally be less tightly tied to `_match`.
Yield information about how to dispatch a case of the
discriminant-like value returned by `trans_switch`.

This should ideally be less tightly tied to `_match`.
Yield information about how to dispatch a case of the discriminant - like value returned by ` trans_switch ` . This should ideally be less tightly tied to ` _match ` .
pub fn trans_case<'blk, 'tcx>(bcx: Block<'blk, 'tcx>, r: &Repr, discr: Disr)
                              -> ValueRef {
    match *r {
        CEnum(ity, ..) => {
            C_integral(ll_inttype(bcx.ccx(), ity), discr.0, true)
        }
        General(ity, _) => {
            C_integral(ll_inttype(bcx.ccx(), ity), discr.0, true)
        }
        Univariant(..) | UntaggedUnion(..) => {
            bug!("no cases for univariants, structs or unions")
        }
        RawNullablePointer { .. } |
        StructWrappedNullablePointer { .. } => {
            assert!(discr == Disr(0) || discr == Disr(1));
            C_bool(bcx.ccx(), discr != Disr(0))
        }
    }
}
pub fn trans_case < ' blk , ' tcx > ( bcx : Block < ' blk , ' tcx > , r : & Repr , discr : Disr ) -> ValueRef { match * r { CEnum ( ity , .. ) => { C_integral ( ll_inttype ( bcx . ccx ( ) , ity ) , discr . 0 , true ) } General ( ity , _ ) => { C_integral ( ll_inttype ( bcx . ccx ( ) , ity ) , discr . 0 , true ) } Univariant ( .. ) | UntaggedUnion ( .. ) => { bug ! ( " " ) } RawNullablePointer { .. } | StructWrappedNullablePointer { .. } => { assert ! ( discr Disr ( 0 ) discr Disr ( 1 ) ) ; C_bool ( bcx . ccx ( ) , discr != Disr ( 0 ) ) } } }
Yield information about how to dispatch a case of the
discriminant-like value returned by `trans_switch`.
Yield information about how to dispatch a case of the discriminant - like value returned by ` trans_switch ` .
bcx
Block<'blk, 'tcx>
r
&Repr
discr
Disr
bcx
Block<'blk, 'tcx>
r
&Repr
discr
Disr