Skip to content

Commit 849dae0

Browse files
committed
Sync from rust 827a0d6
2 parents a8774c3 + 616fe13 commit 849dae0

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

src/abi/comments.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ pub(super) fn add_locals_header_comment(fx: &mut FunctionCx<'_, '_, '_>) {
6565
if fx.clif_comments.enabled() {
6666
fx.add_global_comment(String::new());
6767
fx.add_global_comment(
68-
"kind local ty size align (abi,pref)".to_string(),
68+
"kind local ty size align (abi)".to_string(),
6969
);
7070
}
7171
}
@@ -84,14 +84,13 @@ pub(super) fn add_local_place_comments<'tcx>(
8484
let (kind, extra) = place.debug_comment();
8585

8686
fx.add_global_comment(format!(
87-
"{:<5} {:5} {:30} {:4}b {}, {}{}{}",
87+
"{:<5} {:5} {:30} {:4}b {}{}{}",
8888
kind,
8989
format!("{:?}", local),
9090
format!("{:?}", ty),
9191
size.bytes(),
9292
align.abi.bytes(),
93-
align.pref.bytes(),
94-
if extra.is_empty() { "" } else { " " },
93+
if extra.is_empty() { "" } else { " " },
9594
extra,
9695
));
9796
}

src/constant.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ fn data_id_for_static(
272272
.layout_of(ty::TypingEnv::fully_monomorphized().as_query_input(ty))
273273
.unwrap()
274274
.align
275-
.pref
275+
.abi
276276
.bytes();
277277

278278
let linkage = if import_linkage == rustc_middle::mir::mono::Linkage::ExternalWeak

src/driver/jit.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ pub(crate) fn run_jit(tcx: TyCtxt<'_>, codegen_mode: CodegenMode, jit_args: Vec<
124124
crate::constant::codegen_static(tcx, &mut jit_module, def_id);
125125
}
126126
MonoItem::GlobalAsm(item_id) => {
127-
let item = tcx.hir().item(item_id);
127+
let item = tcx.hir_item(item_id);
128128
tcx.dcx().span_fatal(item.span, "Global asm is not supported in JIT mode");
129129
}
130130
}

src/global_asm.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use rustc_target::asm::InlineAsmArch;
1515
use crate::prelude::*;
1616

1717
pub(crate) fn codegen_global_asm_item(tcx: TyCtxt<'_>, global_asm: &mut String, item_id: ItemId) {
18-
let item = tcx.hir().item(item_id);
18+
let item = tcx.hir_item(item_id);
1919
if let rustc_hir::ItemKind::GlobalAsm(asm) = item.kind {
2020
let is_x86 =
2121
matches!(tcx.sess.asm_arch.unwrap(), InlineAsmArch::X86 | InlineAsmArch::X86_64);

0 commit comments

Comments
 (0)