summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/context.rs
diff options
context:
space:
mode:
authorHans Kratz <hans@appfour.com>2021-08-09 12:25:33 +0000
committerHans Kratz <hans@appfour.com>2021-08-09 12:25:33 +0000
commitc1d0f0a65c36e73ebf7a1ac899b13fb82e3f6483 (patch)
treec236b47acdbcf8f57c18eb60cb23254bbe579161 /compiler/rustc_codegen_llvm/src/context.rs
parentc627c0d88ba8bf73793d9fb9bf1f1452c497f26a (diff)
downloadrust-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.rs3
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 {