about summary refs log tree commit diff
path: root/compiler/rustc_ty_utils/src/layout.rs
diff options
context:
space:
mode:
authorJubilee Young <workingjubilee@gmail.com>2025-02-19 14:53:31 -0800
committerJubilee Young <workingjubilee@gmail.com>2025-02-20 19:55:29 -0800
commit79f41c773aaad6a10c2c752d223bd5aba0371f9b (patch)
treefe6175752d39902f306b559394e52b4ece26b041 /compiler/rustc_ty_utils/src/layout.rs
parent5c474fd99b97b0d86d410dfe25b876b374b436fa (diff)
downloadrust-79f41c773aaad6a10c2c752d223bd5aba0371f9b.tar.gz
rust-79f41c773aaad6a10c2c752d223bd5aba0371f9b.zip
compiler: split vector_align into cabi and llvmlike
Introduce a pair of functions that actually describe what they do,
because it wasn't clear the alignment is sometimes a forgery.
Diffstat (limited to 'compiler/rustc_ty_utils/src/layout.rs')
-rw-r--r--compiler/rustc_ty_utils/src/layout.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/compiler/rustc_ty_utils/src/layout.rs b/compiler/rustc_ty_utils/src/layout.rs
index e95c95ed6c5..0b5683bb84b 100644
--- a/compiler/rustc_ty_utils/src/layout.rs
+++ b/compiler/rustc_ty_utils/src/layout.rs
@@ -535,11 +535,14 @@ fn layout_of_uncached<'tcx>(
                     BackendRepr::Memory { sized: true },
                     AbiAndPrefAlign {
                         abi: Align::max_aligned_factor(size),
-                        pref: dl.vector_align(size).pref,
+                        pref: dl.llvmlike_vector_align(size).pref,
                     },
                 )
             } else {
-                (BackendRepr::Vector { element: e_abi, count: e_len }, dl.vector_align(size))
+                (
+                    BackendRepr::Vector { element: e_abi, count: e_len },
+                    dl.llvmlike_vector_align(size),
+                )
             };
             let size = size.align_to(align.abi);