layout::Variants::Tagged { ref tag, .. } => {
let signed = match tag.value {
// We use `i1` for bytes that are always `0` or `1`,
- // e.g. `#[repr(i8)] enum E { A, B }`, but we can't
+ // e.g., `#[repr(i8)] enum E { A, B }`, but we can't
// let LLVM interpret the `i1` as signed, because
- // then `i1 1` (i.e. E::B) is effectively `i8 -1`.
+ // then `i1 1` (i.e., E::B) is effectively `i8 -1`.
layout::Int(_, signed) => !tag.is_bool() && signed,
_ => false
};
// and compile-time agree on values
// With floats that won't always be true
// so we generate an abort
- let fnname = bx.cx().get_intrinsic(&("llvm.trap"));
- bx.call(fnname, &[], None);
+ bx.abort();
let llval = bx.cx().const_undef(
bx.cx().type_ptr_to(bx.cx().backend_type(layout))
);
}
mir::Place::Static(box mir::Static { def_id, ty }) => {
let layout = cx.layout_of(self.monomorphize(&ty));
- PlaceRef::new_sized(cx.get_static(def_id), layout, layout.align.abi)
+ PlaceRef::new_sized(bx.get_static(def_id), layout, layout.align.abi)
},
mir::Place::Projection(box mir::Projection {
ref base,