diff options
| author | Urgau <3616612+Urgau@users.noreply.github.com> | 2025-02-18 18:34:15 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-18 18:34:15 +0100 |
| commit | 626fcdf48fd9d23c078e9845bfb98f9cd5b7f3ae (patch) | |
| tree | b8002abe6608c932ac69971a28cd8d3ad84c9b19 | |
| parent | 14fb84a5bbf7ea8d75457ffb0ff7899fa3658783 (diff) | |
| parent | fa53181f424f167b8aafc78bcb6b75356d3c5748 (diff) | |
| download | rust-626fcdf48fd9d23c078e9845bfb98f9cd5b7f3ae.tar.gz rust-626fcdf48fd9d23c078e9845bfb98f9cd5b7f3ae.zip | |
Rollup merge of #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``
| -rw-r--r-- | compiler/rustc_codegen_cranelift/src/abi/comments.rs | 7 | ||||
| -rw-r--r-- | compiler/rustc_codegen_cranelift/src/constant.rs | 2 |
2 files changed, 4 insertions, 5 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/abi/comments.rs b/compiler/rustc_codegen_cranelift/src/abi/comments.rs index 521a250ab82..c74efeb59f3 100644 --- a/compiler/rustc_codegen_cranelift/src/abi/comments.rs +++ b/compiler/rustc_codegen_cranelift/src/abi/comments.rs @@ -65,7 +65,7 @@ pub(super) fn add_locals_header_comment(fx: &mut FunctionCx<'_, '_, '_>) { if fx.clif_comments.enabled() { fx.add_global_comment(String::new()); fx.add_global_comment( - "kind local ty size align (abi,pref)".to_string(), + "kind local ty size align (abi)".to_string(), ); } } @@ -84,14 +84,13 @@ pub(super) fn add_local_place_comments<'tcx>( let (kind, extra) = place.debug_comment(); fx.add_global_comment(format!( - "{:<5} {:5} {:30} {:4}b {}, {}{}{}", + "{:<5} {:5} {:30} {:4}b {}{}{}", kind, format!("{:?}", local), format!("{:?}", ty), size.bytes(), align.abi.bytes(), - align.pref.bytes(), - if extra.is_empty() { "" } else { " " }, + if extra.is_empty() { "" } else { " " }, extra, )); } diff --git a/compiler/rustc_codegen_cranelift/src/constant.rs b/compiler/rustc_codegen_cranelift/src/constant.rs index 425b2adf32a..bcc70f4567f 100644 --- a/compiler/rustc_codegen_cranelift/src/constant.rs +++ b/compiler/rustc_codegen_cranelift/src/constant.rs @@ -272,7 +272,7 @@ fn data_id_for_static( .layout_of(ty::TypingEnv::fully_monomorphized().as_query_input(ty)) .unwrap() .align - .pref + .abi .bytes(); let linkage = if import_linkage == rustc_middle::mir::mono::Linkage::ExternalWeak |
