remove an unused argument
it was already unused before, but due to the recursion the compiler did not realize
This commit is contained in:
parent
44401b89ad
commit
0d2cd6f650
@ -125,8 +125,8 @@ impl<'gcc, 'tcx> FnAbiGccExt<'gcc, 'tcx> for FnAbi<'tcx, Ty<'tcx>> {
|
|||||||
PassMode::Ignore => continue,
|
PassMode::Ignore => continue,
|
||||||
PassMode::Direct(_) => arg.layout.immediate_gcc_type(cx),
|
PassMode::Direct(_) => arg.layout.immediate_gcc_type(cx),
|
||||||
PassMode::Pair(..) => {
|
PassMode::Pair(..) => {
|
||||||
argument_tys.push(arg.layout.scalar_pair_element_gcc_type(cx, 0, true));
|
argument_tys.push(arg.layout.scalar_pair_element_gcc_type(cx, 0));
|
||||||
argument_tys.push(arg.layout.scalar_pair_element_gcc_type(cx, 1, true));
|
argument_tys.push(arg.layout.scalar_pair_element_gcc_type(cx, 1));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
PassMode::Indirect { extra_attrs: Some(_), .. } => {
|
PassMode::Indirect { extra_attrs: Some(_), .. } => {
|
||||||
|
@ -821,7 +821,7 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> {
|
|||||||
|
|
||||||
let mut load = |i, scalar: &abi::Scalar, align| {
|
let mut load = |i, scalar: &abi::Scalar, align| {
|
||||||
let llptr = self.struct_gep(pair_type, place.llval, i as u64);
|
let llptr = self.struct_gep(pair_type, place.llval, i as u64);
|
||||||
let llty = place.layout.scalar_pair_element_gcc_type(self, i, false);
|
let llty = place.layout.scalar_pair_element_gcc_type(self, i);
|
||||||
let load = self.load(llty, llptr, align);
|
let load = self.load(llty, llptr, align);
|
||||||
scalar_load_metadata(self, load, scalar);
|
scalar_load_metadata(self, load, scalar);
|
||||||
if scalar.is_bool() { self.trunc(load, self.type_i1()) } else { load }
|
if scalar.is_bool() { self.trunc(load, self.type_i1()) } else { load }
|
||||||
|
@ -4,7 +4,7 @@ use gccjit::{Struct, Type};
|
|||||||
use crate::rustc_codegen_ssa::traits::{BaseTypeMethods, DerivedTypeMethods, LayoutTypeMethods};
|
use crate::rustc_codegen_ssa::traits::{BaseTypeMethods, DerivedTypeMethods, LayoutTypeMethods};
|
||||||
use rustc_middle::bug;
|
use rustc_middle::bug;
|
||||||
use rustc_middle::ty::{self, Ty, TypeVisitableExt};
|
use rustc_middle::ty::{self, Ty, TypeVisitableExt};
|
||||||
use rustc_middle::ty::layout::{FnAbiOf, LayoutOf, TyAndLayout};
|
use rustc_middle::ty::layout::{LayoutOf, TyAndLayout};
|
||||||
use rustc_middle::ty::print::with_no_trimmed_paths;
|
use rustc_middle::ty::print::with_no_trimmed_paths;
|
||||||
use rustc_target::abi::{self, Abi, Align, F32, F64, FieldsShape, Int, Integer, Pointer, PointeeInfo, Size, TyAbiInterface, Variants};
|
use rustc_target::abi::{self, Abi, Align, F32, F64, FieldsShape, Int, Integer, Pointer, PointeeInfo, Size, TyAbiInterface, Variants};
|
||||||
use rustc_target::abi::call::{CastTarget, FnAbi, Reg};
|
use rustc_target::abi::call::{CastTarget, FnAbi, Reg};
|
||||||
@ -74,8 +74,8 @@ fn uncached_gcc_type<'gcc, 'tcx>(cx: &CodegenCx<'gcc, 'tcx>, layout: TyAndLayout
|
|||||||
Abi::ScalarPair(..) => {
|
Abi::ScalarPair(..) => {
|
||||||
return cx.type_struct(
|
return cx.type_struct(
|
||||||
&[
|
&[
|
||||||
layout.scalar_pair_element_gcc_type(cx, 0, false),
|
layout.scalar_pair_element_gcc_type(cx, 0),
|
||||||
layout.scalar_pair_element_gcc_type(cx, 1, false),
|
layout.scalar_pair_element_gcc_type(cx, 1),
|
||||||
],
|
],
|
||||||
false,
|
false,
|
||||||
);
|
);
|
||||||
@ -150,7 +150,7 @@ pub trait LayoutGccExt<'tcx> {
|
|||||||
fn gcc_type<'gcc>(&self, cx: &CodegenCx<'gcc, 'tcx>) -> Type<'gcc>;
|
fn gcc_type<'gcc>(&self, cx: &CodegenCx<'gcc, 'tcx>) -> Type<'gcc>;
|
||||||
fn immediate_gcc_type<'gcc>(&self, cx: &CodegenCx<'gcc, 'tcx>) -> Type<'gcc>;
|
fn immediate_gcc_type<'gcc>(&self, cx: &CodegenCx<'gcc, 'tcx>) -> Type<'gcc>;
|
||||||
fn scalar_gcc_type_at<'gcc>(&self, cx: &CodegenCx<'gcc, 'tcx>, scalar: &abi::Scalar, offset: Size) -> Type<'gcc>;
|
fn scalar_gcc_type_at<'gcc>(&self, cx: &CodegenCx<'gcc, 'tcx>, scalar: &abi::Scalar, offset: Size) -> Type<'gcc>;
|
||||||
fn scalar_pair_element_gcc_type<'gcc>(&self, cx: &CodegenCx<'gcc, 'tcx>, index: usize, immediate: bool) -> Type<'gcc>;
|
fn scalar_pair_element_gcc_type<'gcc>(&self, cx: &CodegenCx<'gcc, 'tcx>, index: usize) -> Type<'gcc>;
|
||||||
fn gcc_field_index(&self, index: usize) -> u64;
|
fn gcc_field_index(&self, index: usize) -> u64;
|
||||||
fn pointee_info_at<'gcc>(&self, cx: &CodegenCx<'gcc, 'tcx>, offset: Size) -> Option<PointeeInfo>;
|
fn pointee_info_at<'gcc>(&self, cx: &CodegenCx<'gcc, 'tcx>, offset: Size) -> Option<PointeeInfo>;
|
||||||
}
|
}
|
||||||
@ -265,7 +265,7 @@ impl<'tcx> LayoutGccExt<'tcx> for TyAndLayout<'tcx> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn scalar_pair_element_gcc_type<'gcc>(&self, cx: &CodegenCx<'gcc, 'tcx>, index: usize, immediate: bool) -> Type<'gcc> {
|
fn scalar_pair_element_gcc_type<'gcc>(&self, cx: &CodegenCx<'gcc, 'tcx>, index: usize) -> Type<'gcc> {
|
||||||
// This must produce the same result for `repr(transparent)` wrappers as for the inner type!
|
// This must produce the same result for `repr(transparent)` wrappers as for the inner type!
|
||||||
// In other words, this should generally not look at the type at all, but only at the
|
// In other words, this should generally not look at the type at all, but only at the
|
||||||
// layout.
|
// layout.
|
||||||
@ -347,8 +347,8 @@ impl<'gcc, 'tcx> LayoutTypeMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
|
|||||||
layout.gcc_field_index(index)
|
layout.gcc_field_index(index)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn scalar_pair_element_backend_type(&self, layout: TyAndLayout<'tcx>, index: usize, immediate: bool) -> Type<'gcc> {
|
fn scalar_pair_element_backend_type(&self, layout: TyAndLayout<'tcx>, index: usize, _immediate: bool) -> Type<'gcc> {
|
||||||
layout.scalar_pair_element_gcc_type(self, index, immediate)
|
layout.scalar_pair_element_gcc_type(self, index)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn cast_backend_type(&self, ty: &CastTarget) -> Type<'gcc> {
|
fn cast_backend_type(&self, ty: &CastTarget) -> Type<'gcc> {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user