diff options
| author | Antoni Boucher <bouanto@zoho.com> | 2021-09-17 17:52:40 -0400 |
|---|---|---|
| committer | Antoni Boucher <bouanto@zoho.com> | 2021-09-17 17:52:40 -0400 |
| commit | df487317d08eb1bf194e87aa7c193bb738ed7546 (patch) | |
| tree | 55809bfa285895a267b36eb05873008679c50bb8 /compiler/rustc_codegen_gcc/src/common.rs | |
| parent | 87f8525faacba5299577db41371185c186def330 (diff) | |
| parent | 48d60ab7c505c6c1ebb042eacaafd8dc9f7a9267 (diff) | |
| download | rust-df487317d08eb1bf194e87aa7c193bb738ed7546.tar.gz rust-df487317d08eb1bf194e87aa7c193bb738ed7546.zip | |
Merge commit '48d60ab7c505c6c1ebb042eacaafd8dc9f7a9267' into libgccjit-codegen
Diffstat (limited to 'compiler/rustc_codegen_gcc/src/common.rs')
| -rw-r--r-- | compiler/rustc_codegen_gcc/src/common.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/compiler/rustc_codegen_gcc/src/common.rs b/compiler/rustc_codegen_gcc/src/common.rs index 752ba99af9c..a24fe0df911 100644 --- a/compiler/rustc_codegen_gcc/src/common.rs +++ b/compiler/rustc_codegen_gcc/src/common.rs @@ -12,10 +12,11 @@ use rustc_codegen_ssa::traits::{ }; use rustc_middle::bug; use rustc_middle::mir::Mutability; -use rustc_middle::ty::{layout::TyAndLayout, ScalarInt}; -use rustc_mir::interpret::{Allocation, GlobalAlloc, Scalar}; +use rustc_middle::ty::ScalarInt; +use rustc_middle::ty::layout::{TyAndLayout, LayoutOf}; +use rustc_middle::mir::interpret::{Allocation, GlobalAlloc, Scalar}; use rustc_span::Symbol; -use rustc_target::abi::{self, HasDataLayout, LayoutOf, Pointer, Size}; +use rustc_target::abi::{self, HasDataLayout, Pointer, Size}; use crate::consts::const_alloc_to_gcc; use crate::context::CodegenCx; @@ -212,7 +213,7 @@ impl<'gcc, 'tcx> ConstMethods<'tcx> for CodegenCx<'gcc, 'tcx> { None } - fn scalar_to_backend(&self, cv: Scalar, layout: &abi::Scalar, ty: Type<'gcc>) -> RValue<'gcc> { + fn scalar_to_backend(&self, cv: Scalar, layout: abi::Scalar, ty: Type<'gcc>) -> RValue<'gcc> { let bitsize = if layout.is_bool() { 1 } else { layout.value.size(self).bits() }; match cv { Scalar::Int(ScalarInt::ZST) => { |
