diff options
| author | Jubilee <46493976+workingjubilee@users.noreply.github.com> | 2024-03-11 09:29:36 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-11 09:29:36 -0700 |
| commit | afa058179d3237a009174106576d6d6e1543e9e8 (patch) | |
| tree | 3aa1d5d21f7eeab0db74cf4d8d232571c138941f /compiler/rustc_codegen_llvm/src/context.rs | |
| parent | 05ff86c389c206c668c27d4bba531a21d9c12065 (diff) | |
| parent | d673fd8589e639060377b282f6248c98a4855502 (diff) | |
| download | rust-afa058179d3237a009174106576d6d6e1543e9e8.tar.gz rust-afa058179d3237a009174106576d6d6e1543e9e8.zip | |
Rollup merge of #122166 - beetrees:remove-field-remapping, r=davidtwco
Remove the unused `field_remapping` field from `TypeLowering` The `field_remapping` field of `TypeLowering` has been unused since #121665. This PR removes it, then replaces the `TypeLowering` struct with its only remaining member `&'ll Type`.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/context.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/context.rs | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/compiler/rustc_codegen_llvm/src/context.rs b/compiler/rustc_codegen_llvm/src/context.rs index 37c690a0128..f89c8c9f836 100644 --- a/compiler/rustc_codegen_llvm/src/context.rs +++ b/compiler/rustc_codegen_llvm/src/context.rs @@ -77,8 +77,8 @@ pub struct CodegenCx<'ll, 'tcx> { /// See <https://llvm.org/docs/LangRef.html#the-llvm-compiler-used-global-variable> for details pub compiler_used_statics: RefCell<Vec<&'ll Value>>, - /// Mapping of non-scalar types to llvm types and field remapping if needed. - pub type_lowering: RefCell<FxHashMap<(Ty<'tcx>, Option<VariantIdx>), TypeLowering<'ll>>>, + /// Mapping of non-scalar types to llvm types. + pub type_lowering: RefCell<FxHashMap<(Ty<'tcx>, Option<VariantIdx>), &'ll Type>>, /// Mapping of scalar types to llvm types. pub scalar_lltypes: RefCell<FxHashMap<Ty<'tcx>, &'ll Type>>, @@ -105,15 +105,6 @@ pub struct CodegenCx<'ll, 'tcx> { pub renamed_statics: RefCell<FxHashMap<DefId, &'ll Value>>, } -pub struct TypeLowering<'ll> { - /// Associated LLVM type - pub lltype: &'ll Type, - - /// If padding is used the slice maps fields from source order - /// to llvm order. - pub field_remapping: Option<SmallVec<[u32; 4]>>, -} - fn to_llvm_tls_model(tls_model: TlsModel) -> llvm::ThreadLocalMode { match tls_model { TlsModel::GeneralDynamic => llvm::ThreadLocalMode::GeneralDynamic, |
