diff options
| author | Hans Kratz <hans@appfour.com> | 2021-08-09 12:25:33 +0000 |
|---|---|---|
| committer | Hans Kratz <hans@appfour.com> | 2021-08-09 12:25:33 +0000 |
| commit | c1d0f0a65c36e73ebf7a1ac899b13fb82e3f6483 (patch) | |
| tree | c236b47acdbcf8f57c18eb60cb23254bbe579161 /compiler/rustc_codegen_llvm/src/context.rs | |
| parent | c627c0d88ba8bf73793d9fb9bf1f1452c497f26a (diff) | |
| download | rust-c1d0f0a65c36e73ebf7a1ac899b13fb82e3f6483.tar.gz rust-c1d0f0a65c36e73ebf7a1ac899b13fb82e3f6483.zip | |
TEST: Use SmallVec<[u32; 4]> for field projection.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/context.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/context.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_llvm/src/context.rs b/compiler/rustc_codegen_llvm/src/context.rs index d28a579ff10..225514ea863 100644 --- a/compiler/rustc_codegen_llvm/src/context.rs +++ b/compiler/rustc_codegen_llvm/src/context.rs @@ -24,6 +24,7 @@ use rustc_span::source_map::{Span, DUMMY_SP}; use rustc_span::symbol::Symbol; use rustc_target::abi::{HasDataLayout, LayoutOf, PointeeInfo, Size, TargetDataLayout, VariantIdx}; use rustc_target::spec::{HasTargetSpec, RelocModel, Target, TlsModel}; +use smallvec::SmallVec; use std::cell::{Cell, RefCell}; use std::ffi::CStr; @@ -102,7 +103,7 @@ pub struct TypeLowering<'ll> { /// If padding is used the slice maps fields from source order /// to llvm order. - pub field_remapping: Option<Box<[u32]>>, + pub field_remapping: Option<Box<SmallVec<[u32; 4]>>>, } fn to_llvm_tls_model(tls_model: TlsModel) -> llvm::ThreadLocalMode { |
