Skip to content

Commit d82eec0

Browse files
authoredFeb 18, 2025
Unrolled build for rust-lang#137195
Rollup merge of rust-lang#137195 - workingjubilee:remove-pref-align-from-cg-clif, r=bjorn3 cg_clif: use exclusively ABI alignment This will minimize possible conflict with future updates to AbiAndPrefAlign that may remove some fields. It is also almost a bug to consider them. r? ``@bjorn3``
2 parents 3b022d8 + fa53181 commit d82eec0

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed
 

‎compiler/rustc_codegen_cranelift/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
}

‎compiler/rustc_codegen_cranelift/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

0 commit comments

Comments
 (0)