diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2022-03-05 07:28:41 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2022-03-11 13:31:24 +1100 |
| commit | ca5525d5643f4eb7de5c5e69d0691fc8f1cacfca (patch) | |
| tree | cbe3682d3e3ff0d1a48b76f972f0322ea28c9542 /compiler/rustc_codegen_cranelift/src/common.rs | |
| parent | 5f4e0677190b82e61dc507e3e72caf89da8e5e28 (diff) | |
| download | rust-ca5525d5643f4eb7de5c5e69d0691fc8f1cacfca.tar.gz rust-ca5525d5643f4eb7de5c5e69d0691fc8f1cacfca.zip | |
Improve `AdtDef` interning.
This commit makes `AdtDef` use `Interned`. Much the commit is tedious changes to introduce getter functions. The interesting changes are in `compiler/rustc_middle/src/ty/adt.rs`.
Diffstat (limited to 'compiler/rustc_codegen_cranelift/src/common.rs')
| -rw-r--r-- | compiler/rustc_codegen_cranelift/src/common.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/common.rs b/compiler/rustc_codegen_cranelift/src/common.rs index d3e36be3244..89fd0bfa8bb 100644 --- a/compiler/rustc_codegen_cranelift/src/common.rs +++ b/compiler/rustc_codegen_cranelift/src/common.rs @@ -67,7 +67,7 @@ fn clif_type_from_ty<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>) -> Option<types::Typ pointer_ty(tcx) } } - ty::Adt(adt_def, _) if adt_def.repr.simd() => { + ty::Adt(adt_def, _) if adt_def.repr().simd() => { let (element, count) = match &tcx.layout_of(ParamEnv::reveal_all().and(ty)).unwrap().abi { Abi::Vector { element, count } => (element.clone(), *count), |
