Sync from rust 1dec35a1b0
This commit is contained in:
commit
acb32e6eb5
6 changed files with 7 additions and 5 deletions
|
|
@ -772,6 +772,7 @@ fn codegen_stmt<'tcx>(
|
|||
}
|
||||
StatementKind::StorageLive(_)
|
||||
| StatementKind::StorageDead(_)
|
||||
| StatementKind::Deinit(_)
|
||||
| StatementKind::Nop
|
||||
| StatementKind::FakeRead(..)
|
||||
| StatementKind::Retag { .. }
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ pub(crate) fn pointer_ty(tcx: TyCtxt<'_>) -> types::Type {
|
|||
}
|
||||
|
||||
pub(crate) fn scalar_to_clif_type(tcx: TyCtxt<'_>, scalar: Scalar) -> Type {
|
||||
match scalar.value {
|
||||
match scalar.primitive() {
|
||||
Primitive::Int(int, _sign) => match int {
|
||||
Integer::I8 => types::I8,
|
||||
Integer::I16 => types::I16,
|
||||
|
|
|
|||
|
|
@ -518,6 +518,7 @@ pub(crate) fn mir_operand_get_const_val<'tcx>(
|
|||
StatementKind::Assign(_)
|
||||
| StatementKind::FakeRead(_)
|
||||
| StatementKind::SetDiscriminant { .. }
|
||||
| StatementKind::Deinit(_)
|
||||
| StatementKind::StorageLive(_)
|
||||
| StatementKind::StorageDead(_)
|
||||
| StatementKind::Retag(_, _)
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ pub(crate) fn codegen_get_discriminant<'tcx>(
|
|||
// Decode the discriminant (specifically if it's niche-encoded).
|
||||
match *tag_encoding {
|
||||
TagEncoding::Direct => {
|
||||
let signed = match tag_scalar.value {
|
||||
let signed = match tag_scalar.primitive() {
|
||||
Int(_, signed) => signed,
|
||||
_ => false,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -288,8 +288,8 @@ fn load_imported_symbols_for_jit(
|
|||
match data[cnum.as_usize() - 1] {
|
||||
Linkage::NotLinked | Linkage::IncludedFromDylib => {}
|
||||
Linkage::Static => {
|
||||
let name = &crate_info.crate_name[&cnum];
|
||||
let mut err = sess.struct_err(&format!("Can't load static lib {}", name.as_str()));
|
||||
let name = crate_info.crate_name[&cnum];
|
||||
let mut err = sess.struct_err(&format!("Can't load static lib {}", name));
|
||||
err.note("rustc_codegen_cranelift can only load dylibs in JIT mode.");
|
||||
err.emit();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ fn codegen_field<'tcx>(
|
|||
}
|
||||
|
||||
fn scalar_pair_calculate_b_offset(tcx: TyCtxt<'_>, a_scalar: Scalar, b_scalar: Scalar) -> Offset32 {
|
||||
let b_offset = a_scalar.value.size(&tcx).align_to(b_scalar.value.align(&tcx).abi);
|
||||
let b_offset = a_scalar.size(&tcx).align_to(b_scalar.align(&tcx).abi);
|
||||
Offset32::new(b_offset.bytes().try_into().unwrap())
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue