pub fn trans_start_init(bcx: &Block, r: &Repr, val: ValueRef, discr: Disr) {
    match *r {
        CEnum(ity, min, max) => {
            assert_discr_in_range(ity, min, max, discr);
            Store(bcx, C_integral(ll_inttype(bcx.ccx(), ity), discr as u64, true),
                  val)
        }
        General(ity, _) => {
            Store(bcx, C_integral(ll_inttype(bcx.ccx(), ity), discr as u64, true),
                  GEPi(bcx, val, [0, 0]))
        }
        Univariant(ref st, true) => {
            assert_eq!(discr, 0);
            Store(bcx, C_bool(true),
                  GEPi(bcx, val, [0, st.fields.len() - 1]))
        }
        Univariant(..) => {
            assert_eq!(discr, 0);
        }
        NullablePointer{ nonnull: ref nonnull, nndiscr, ptrfield, .. } => {
            if discr != nndiscr {
                let llptrptr = GEPi(bcx, val, [0, ptrfield]);
                let llptrty = type_of::type_of(bcx.ccx(), nonnull.fields[ptrfield]);
                Store(bcx, C_null(llptrty), llptrptr)
            }
        }
    }
}
/**
 * Begin initializing a new value of the given case of the given
 * representation.  The fields, if any, should then be initialized via
 * `trans_field_ptr`.
 */
Begin initializing a new value of the given case of the given
representation.  The fields, if any, should then be initialized via
`trans_field_ptr`.
Begin initializing a new value of the given case of the given representation . The fields if any should then be initialized via ` trans_field_ptr ` .
pub fn trans_start_init(bcx: &Block, r: &Repr, val: ValueRef, discr: Disr) {
    match *r {
        CEnum(ity, min, max) => {
            assert_discr_in_range(ity, min, max, discr);
            Store(bcx, C_integral(ll_inttype(bcx.ccx(), ity), discr as u64, true),
                  val)
        }
        General(ity, _) => {
            Store(bcx, C_integral(ll_inttype(bcx.ccx(), ity), discr as u64, true),
                  GEPi(bcx, val, [0, 0]))
        }
        Univariant(ref st, true) => {
            assert_eq!(discr, 0);
            Store(bcx, C_bool(true),
                  GEPi(bcx, val, [0, st.fields.len() - 1]))
        }
        Univariant(..) => {
            assert_eq!(discr, 0);
        }
        NullablePointer{ nonnull: ref nonnull, nndiscr, ptrfield, .. } => {
            if discr != nndiscr {
                let llptrptr = GEPi(bcx, val, [0, ptrfield]);
                let llptrty = type_of::type_of(bcx.ccx(), nonnull.fields[ptrfield]);
                Store(bcx, C_null(llptrty), llptrptr)
            }
        }
    }
}
pub fn trans_start_init ( bcx : & Block , r : & Repr , val : ValueRef , discr : Disr ) { match * r { CEnum ( ity , min , max ) => { assert_discr_in_range ( ity , min , max , discr ) ; Store ( bcx , C_integral ( ll_inttype ( bcx . ccx ( ) , ity ) , discr as u64 , true ) , val ) } General ( ity , _ ) => { Store ( bcx , C_integral ( ll_inttype ( bcx . ccx ( ) , ity ) , discr as u64 , true ) , GEPi ( bcx , val , [ 0 , 0 ] ) ) } Univariant ( ref st , true ) => { assert_eq ! ( discr 0 ) ; Store ( bcx , C_bool ( true ) , GEPi ( bcx , val , [ 0 , st . fields . len ( ) - 1 ] ) ) } Univariant ( .. ) => { assert_eq ! ( discr 0 ) ; } NullablePointer { nonnull : ref nonnull , nndiscr , ptrfield , .. } => { if discr != nndiscr { let llptrptr = GEPi ( bcx , val , [ 0 , ptrfield ] ) ; let llptrty = type_of :: type_of ( bcx . ccx ( ) , nonnull . fields [ ptrfield ] ) ; Store ( bcx , C_null ( llptrty ) , llptrptr ) } } } }
Begin initializing a new value of the given case of the given
 representation.
Begin initializing a new value of the given case of the given representation .
bcx
&Block
r
&Repr
val
ValueRef
discr
Disr
bcx
&Block
r
&Repr
val
ValueRef
discr
Disr