1
Fork 0

TEST: Use SmallVec<[u32; 4]> for field projection.

This commit is contained in:
Hans Kratz 2021-08-09 12:25:33 +00:00
parent c627c0d88b
commit c1d0f0a65c
2 changed files with 7 additions and 5 deletions

View file

@ -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 {