From 6567154ede38d9bb65413942845bf9739d830a20 Mon Sep 17 00:00:00 2001 From: Eduard-Mihai Burtescu Date: Tue, 29 Oct 2019 16:35:26 +0200 Subject: rustc_target: rename {Fn,Arg}Type to {Fn,Arg}Abi. --- src/librustc_codegen_llvm/abi.rs | 28 ++++++++++++++-------------- src/librustc_codegen_llvm/declare.rs | 8 ++++---- src/librustc_codegen_llvm/intrinsic.rs | 14 +++++++------- src/librustc_codegen_llvm/type_.rs | 8 ++++---- src/librustc_codegen_llvm/type_of.rs | 4 ++-- 5 files changed, 31 insertions(+), 31 deletions(-) (limited to 'src/librustc_codegen_llvm') diff --git a/src/librustc_codegen_llvm/abi.rs b/src/librustc_codegen_llvm/abi.rs index ae5cfc4d97b..5f9265df4aa 100644 --- a/src/librustc_codegen_llvm/abi.rs +++ b/src/librustc_codegen_llvm/abi.rs @@ -7,7 +7,7 @@ use crate::type_of::{LayoutLlvmExt}; use rustc_codegen_ssa::MemFlags; use rustc_codegen_ssa::mir::place::PlaceRef; use rustc_codegen_ssa::mir::operand::OperandValue; -use rustc_target::abi::call::ArgType; +use rustc_target::abi::call::ArgAbi; use rustc_codegen_ssa::traits::*; @@ -179,14 +179,14 @@ pub trait ArgTypeExt<'ll, 'tcx> { ); } -impl ArgTypeExt<'ll, 'tcx> for ArgType<'tcx, Ty<'tcx>> { +impl ArgTypeExt<'ll, 'tcx> for ArgAbi<'tcx, Ty<'tcx>> { /// Gets the LLVM type for a place of the original Rust type of /// this argument/return, i.e., the result of `type_of::type_of`. fn memory_ty(&self, cx: &CodegenCx<'ll, 'tcx>) -> &'ll Type { self.layout.llvm_type(cx) } - /// Stores a direct/indirect value described by this ArgType into a + /// Stores a direct/indirect value described by this ArgAbi into a /// place for the original Rust type of this argument/return. /// Can be used for both storing formal arguments into Rust variables /// or results of call/invoke instructions into their destinations. @@ -202,7 +202,7 @@ impl ArgTypeExt<'ll, 'tcx> for ArgType<'tcx, Ty<'tcx>> { if self.is_sized_indirect() { OperandValue::Ref(val, None, self.layout.align.abi).store(bx, dst) } else if self.is_unsized_indirect() { - bug!("unsized ArgType must be handled through store_fn_arg"); + bug!("unsized ArgAbi must be handled through store_fn_arg"); } else if let PassMode::Cast(cast) = self.mode { // FIXME(eddyb): Figure out when the simpler Store is safe, clang // uses it for i16 -> {i8, i8}, but not for i24 -> {i8, i8, i8}. @@ -282,21 +282,21 @@ impl ArgTypeExt<'ll, 'tcx> for ArgType<'tcx, Ty<'tcx>> { impl ArgTypeMethods<'tcx> for Builder<'a, 'll, 'tcx> { fn store_fn_arg( &mut self, - ty: &ArgType<'tcx, Ty<'tcx>>, + arg_abi: &ArgAbi<'tcx, Ty<'tcx>>, idx: &mut usize, dst: PlaceRef<'tcx, Self::Value> ) { - ty.store_fn_arg(self, idx, dst) + arg_abi.store_fn_arg(self, idx, dst) } - fn store_arg_ty( + fn store_arg( &mut self, - ty: &ArgType<'tcx, Ty<'tcx>>, + arg_abi: &ArgAbi<'tcx, Ty<'tcx>>, val: &'ll Value, dst: PlaceRef<'tcx, &'ll Value> ) { - ty.store(self, val, dst) + arg_abi.store(self, val, dst) } - fn memory_ty(&self, ty: &ArgType<'tcx, Ty<'tcx>>) -> &'ll Type { - ty.memory_ty(self) + fn arg_memory_ty(&self, arg_abi: &ArgAbi<'tcx, Ty<'tcx>>) -> &'ll Type { + arg_abi.memory_ty(self) } } @@ -308,7 +308,7 @@ pub trait FnTypeLlvmExt<'tcx> { fn apply_attrs_callsite(&self, bx: &mut Builder<'a, 'll, 'tcx>, callsite: &'ll Value); } -impl<'tcx> FnTypeLlvmExt<'tcx> for FnType<'tcx, Ty<'tcx>> { +impl<'tcx> FnTypeLlvmExt<'tcx> for FnAbi<'tcx, Ty<'tcx>> { fn llvm_type(&self, cx: &CodegenCx<'ll, 'tcx>) -> &'ll Type { let args_capacity: usize = self.args.iter().map(|arg| if arg.pad.is_some() { 1 } else { 0 } + @@ -478,10 +478,10 @@ impl<'tcx> FnTypeLlvmExt<'tcx> for FnType<'tcx, Ty<'tcx>> { impl AbiBuilderMethods<'tcx> for Builder<'a, 'll, 'tcx> { fn apply_attrs_callsite( &mut self, - ty: &FnType<'tcx, Ty<'tcx>>, + fn_abi: &FnAbi<'tcx, Ty<'tcx>>, callsite: Self::Value ) { - ty.apply_attrs_callsite(self, callsite) + fn_abi.apply_attrs_callsite(self, callsite) } fn get_param(&self, index: usize) -> Self::Value { diff --git a/src/librustc_codegen_llvm/declare.rs b/src/librustc_codegen_llvm/declare.rs index 62eab0f3d4e..8c22ac0118a 100644 --- a/src/librustc_codegen_llvm/declare.rs +++ b/src/librustc_codegen_llvm/declare.rs @@ -13,7 +13,7 @@ use crate::llvm; use crate::llvm::AttributePlace::Function; -use crate::abi::{FnType, FnTypeLlvmExt}; +use crate::abi::{FnAbi, FnTypeLlvmExt}; use crate::attributes; use crate::context::CodegenCx; use crate::type_::Type; @@ -100,14 +100,14 @@ impl DeclareMethods<'tcx> for CodegenCx<'ll, 'tcx> { let sig = self.tcx.normalize_erasing_late_bound_regions(ty::ParamEnv::reveal_all(), &sig); debug!("declare_rust_fn (after region erasure) sig={:?}", sig); - let fty = FnType::new(self, sig, &[]); - let llfn = declare_raw_fn(self, name, fty.llvm_cconv(), fty.llvm_type(self)); + let fn_abi = FnAbi::new(self, sig, &[]); + let llfn = declare_raw_fn(self, name, fn_abi.llvm_cconv(), fn_abi.llvm_type(self)); if self.layout_of(sig.output()).abi.is_uninhabited() { llvm::Attribute::NoReturn.apply_llfn(Function, llfn); } - fty.apply_attrs_llfn(self, llfn); + fn_abi.apply_attrs_llfn(self, llfn); llfn } diff --git a/src/librustc_codegen_llvm/intrinsic.rs b/src/librustc_codegen_llvm/intrinsic.rs index 97bd57a7ded..c3afc3e4fe0 100644 --- a/src/librustc_codegen_llvm/intrinsic.rs +++ b/src/librustc_codegen_llvm/intrinsic.rs @@ -1,7 +1,7 @@ use crate::attributes; use crate::llvm; use crate::llvm_util; -use crate::abi::{Abi, FnType, LlvmType, PassMode}; +use crate::abi::{Abi, FnAbi, LlvmType, PassMode}; use crate::context::CodegenCx; use crate::type_::Type; use crate::type_of::LayoutLlvmExt; @@ -84,7 +84,7 @@ impl IntrinsicCallMethods<'tcx> for Builder<'a, 'll, 'tcx> { fn codegen_intrinsic_call( &mut self, instance: ty::Instance<'tcx>, - fn_ty: &FnType<'tcx, Ty<'tcx>>, + fn_abi: &FnAbi<'tcx, Ty<'tcx>>, args: &[OperandRef<'tcx, &'ll Value>], llresult: &'ll Value, span: Span, @@ -104,7 +104,7 @@ impl IntrinsicCallMethods<'tcx> for Builder<'a, 'll, 'tcx> { let name = &*tcx.item_name(def_id).as_str(); let llret_ty = self.layout_of(ret_ty).llvm_type(self); - let result = PlaceRef::new_sized(llresult, fn_ty.ret.layout); + let result = PlaceRef::new_sized(llresult, fn_abi.ret.layout); let simple = get_simple_intrinsic(self, name); let llval = match name { @@ -147,7 +147,7 @@ impl IntrinsicCallMethods<'tcx> for Builder<'a, 'll, 'tcx> { self.call(intrinsic, &[args[0].immediate(), args[1].immediate()], None) } "va_arg" => { - match fn_ty.ret.layout.abi { + match fn_abi.ret.layout.abi { layout::Abi::Scalar(ref scalar) => { match scalar.value { Primitive::Int(..) => { @@ -276,7 +276,7 @@ impl IntrinsicCallMethods<'tcx> for Builder<'a, 'll, 'tcx> { "volatile_load" | "unaligned_volatile_load" => { let tp_ty = substs.type_at(0); let mut ptr = args[0].immediate(); - if let PassMode::Cast(ty) = fn_ty.ret.mode { + if let PassMode::Cast(ty) = fn_abi.ret.mode { ptr = self.pointercast(ptr, self.type_ptr_to(ty.llvm_type(self))); } let load = self.volatile_load(ptr); @@ -715,8 +715,8 @@ impl IntrinsicCallMethods<'tcx> for Builder<'a, 'll, 'tcx> { _ => bug!("unknown intrinsic '{}'", name), }; - if !fn_ty.ret.is_ignore() { - if let PassMode::Cast(ty) = fn_ty.ret.mode { + if !fn_abi.ret.is_ignore() { + if let PassMode::Cast(ty) = fn_abi.ret.mode { let ptr_llty = self.type_ptr_to(ty.llvm_type(self)); let ptr = self.pointercast(result.llval, ptr_llty); self.store(llval, ptr, result.align); diff --git a/src/librustc_codegen_llvm/type_.rs b/src/librustc_codegen_llvm/type_.rs index 8d6cd0bcf47..bd08052014d 100644 --- a/src/librustc_codegen_llvm/type_.rs +++ b/src/librustc_codegen_llvm/type_.rs @@ -12,7 +12,7 @@ use crate::abi::{LlvmType, FnTypeLlvmExt}; use syntax::ast; use rustc::ty::Ty; use rustc::ty::layout::{self, Align, Size, TyLayout}; -use rustc_target::abi::call::{CastTarget, FnType, Reg}; +use rustc_target::abi::call::{CastTarget, FnAbi, Reg}; use rustc_data_structures::small_c_str::SmallCStr; use rustc_codegen_ssa::common::TypeKind; @@ -243,7 +243,7 @@ impl BaseTypeMethods<'tcx> for CodegenCx<'ll, 'tcx> { fn type_ptr_to(&self, ty: &'ll Type) -> &'ll Type { assert_ne!(self.type_kind(ty), TypeKind::Function, - "don't call ptr_to on function types, use ptr_to_llvm_type on FnType instead"); + "don't call ptr_to on function types, use ptr_to_llvm_type on FnAbi instead"); ty.ptr_to() } @@ -336,8 +336,8 @@ impl LayoutTypeMethods<'tcx> for CodegenCx<'ll, 'tcx> { fn cast_backend_type(&self, ty: &CastTarget) -> &'ll Type { ty.llvm_type(self) } - fn fn_ptr_backend_type(&self, ty: &FnType<'tcx, Ty<'tcx>>) -> &'ll Type { - ty.ptr_to_llvm_type(self) + fn fn_ptr_backend_type(&self, fn_abi: &FnAbi<'tcx, Ty<'tcx>>) -> &'ll Type { + fn_abi.ptr_to_llvm_type(self) } fn reg_backend_type(&self, ty: &Reg) -> &'ll Type { ty.llvm_type(self) diff --git a/src/librustc_codegen_llvm/type_of.rs b/src/librustc_codegen_llvm/type_of.rs index d921bbc96ad..546d0365469 100644 --- a/src/librustc_codegen_llvm/type_of.rs +++ b/src/librustc_codegen_llvm/type_of.rs @@ -1,4 +1,4 @@ -use crate::abi::{FnType}; +use crate::abi::{FnAbi}; use crate::common::*; use crate::type_::Type; use rustc::ty::{self, Ty, TypeFoldable}; @@ -239,7 +239,7 @@ impl<'tcx> LayoutLlvmExt<'tcx> for TyLayout<'tcx> { ty::ParamEnv::reveal_all(), &sig, ); - cx.fn_ptr_backend_type(&FnType::new(cx, sig, &[])) + cx.fn_ptr_backend_type(&FnAbi::new(cx, sig, &[])) } _ => self.scalar_llvm_type_at(cx, scalar, Size::ZERO) }; -- cgit 1.4.1-3-g733a5 From 89c8f3abca8c1e6f7030836052e3bc0691a0dc03 Mon Sep 17 00:00:00 2001 From: Eduard-Mihai Burtescu Date: Tue, 29 Oct 2019 19:17:16 +0200 Subject: rustc: rename {Fn,Arg}TypeExt to {Fn,Arg}AbiExt. --- src/librustc/ty/layout.rs | 6 +++--- src/librustc_codegen_llvm/abi.rs | 4 ++-- src/librustc_codegen_llvm/declare.rs | 2 +- src/librustc_codegen_llvm/type_of.rs | 2 +- src/librustc_codegen_ssa/mir/block.rs | 2 +- src/librustc_codegen_ssa/mir/mod.rs | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) (limited to 'src/librustc_codegen_llvm') diff --git a/src/librustc/ty/layout.rs b/src/librustc/ty/layout.rs index a170fe8a953..95040135eb7 100644 --- a/src/librustc/ty/layout.rs +++ b/src/librustc/ty/layout.rs @@ -2487,7 +2487,7 @@ impl<'a, 'tcx> HashStable> for LayoutError<'tcx> { } } -pub trait FnTypeExt<'tcx, C> +pub trait FnAbiExt<'tcx, C> where C: LayoutOf, TyLayout = TyLayout<'tcx>> + HasDataLayout @@ -2507,7 +2507,7 @@ where fn adjust_for_abi(&mut self, cx: &C, abi: SpecAbi); } -impl<'tcx, C> FnTypeExt<'tcx, C> for call::FnAbi<'tcx, Ty<'tcx>> +impl<'tcx, C> FnAbiExt<'tcx, C> for call::FnAbi<'tcx, Ty<'tcx>> where C: LayoutOf, TyLayout = TyLayout<'tcx>> + HasDataLayout @@ -2528,7 +2528,7 @@ where } fn new_vtable(cx: &C, sig: ty::FnSig<'tcx>, extra_args: &[Ty<'tcx>]) -> Self { - FnTypeExt::new_internal(cx, sig, extra_args, |ty, arg_idx| { + FnAbiExt::new_internal(cx, sig, extra_args, |ty, arg_idx| { let mut layout = cx.layout_of(ty); // Don't pass the vtable, it's not an argument of the virtual fn. // Instead, pass just the data pointer, but give it the type `*const/mut dyn Trait` diff --git a/src/librustc_codegen_llvm/abi.rs b/src/librustc_codegen_llvm/abi.rs index 5f9265df4aa..31e2fb3eccb 100644 --- a/src/librustc_codegen_llvm/abi.rs +++ b/src/librustc_codegen_llvm/abi.rs @@ -163,7 +163,7 @@ impl LlvmType for CastTarget { } } -pub trait ArgTypeExt<'ll, 'tcx> { +pub trait ArgAbiExt<'ll, 'tcx> { fn memory_ty(&self, cx: &CodegenCx<'ll, 'tcx>) -> &'ll Type; fn store( &self, @@ -179,7 +179,7 @@ pub trait ArgTypeExt<'ll, 'tcx> { ); } -impl ArgTypeExt<'ll, 'tcx> for ArgAbi<'tcx, Ty<'tcx>> { +impl ArgAbiExt<'ll, 'tcx> for ArgAbi<'tcx, Ty<'tcx>> { /// Gets the LLVM type for a place of the original Rust type of /// this argument/return, i.e., the result of `type_of::type_of`. fn memory_ty(&self, cx: &CodegenCx<'ll, 'tcx>) -> &'ll Type { diff --git a/src/librustc_codegen_llvm/declare.rs b/src/librustc_codegen_llvm/declare.rs index 8c22ac0118a..1fe97001fc9 100644 --- a/src/librustc_codegen_llvm/declare.rs +++ b/src/librustc_codegen_llvm/declare.rs @@ -19,7 +19,7 @@ use crate::context::CodegenCx; use crate::type_::Type; use crate::value::Value; use rustc::ty::{self, PolyFnSig}; -use rustc::ty::layout::{FnTypeExt, LayoutOf}; +use rustc::ty::layout::{FnAbiExt, LayoutOf}; use rustc::session::config::Sanitizer; use rustc_data_structures::small_c_str::SmallCStr; use rustc_codegen_ssa::traits::*; diff --git a/src/librustc_codegen_llvm/type_of.rs b/src/librustc_codegen_llvm/type_of.rs index 546d0365469..dc68872ede1 100644 --- a/src/librustc_codegen_llvm/type_of.rs +++ b/src/librustc_codegen_llvm/type_of.rs @@ -2,7 +2,7 @@ use crate::abi::{FnAbi}; use crate::common::*; use crate::type_::Type; use rustc::ty::{self, Ty, TypeFoldable}; -use rustc::ty::layout::{self, Align, LayoutOf, FnTypeExt, PointeeInfo, Size, TyLayout}; +use rustc::ty::layout::{self, Align, LayoutOf, FnAbiExt, PointeeInfo, Size, TyLayout}; use rustc_target::abi::{FloatTy, TyLayoutMethods}; use rustc::ty::print::obsolete::DefPathBasedNames; use rustc_codegen_ssa::traits::*; diff --git a/src/librustc_codegen_ssa/mir/block.rs b/src/librustc_codegen_ssa/mir/block.rs index bfc3c47592e..07e904300a6 100644 --- a/src/librustc_codegen_ssa/mir/block.rs +++ b/src/librustc_codegen_ssa/mir/block.rs @@ -1,7 +1,7 @@ use rustc_index::vec::Idx; use rustc::middle::lang_items; use rustc::ty::{self, Ty, TypeFoldable, Instance}; -use rustc::ty::layout::{self, LayoutOf, HasTyCtxt, FnTypeExt}; +use rustc::ty::layout::{self, LayoutOf, HasTyCtxt, FnAbiExt}; use rustc::mir::{self, PlaceBase, Static, StaticKind}; use rustc::mir::interpret::PanicInfo; use rustc_target::abi::call::{ArgAbi, FnAbi, PassMode}; diff --git a/src/librustc_codegen_ssa/mir/mod.rs b/src/librustc_codegen_ssa/mir/mod.rs index 97d3ad2e238..fec31f07a34 100644 --- a/src/librustc_codegen_ssa/mir/mod.rs +++ b/src/librustc_codegen_ssa/mir/mod.rs @@ -1,5 +1,5 @@ use rustc::ty::{self, Ty, TypeFoldable, Instance}; -use rustc::ty::layout::{TyLayout, HasTyCtxt, FnTypeExt}; +use rustc::ty::layout::{TyLayout, HasTyCtxt, FnAbiExt}; use rustc::mir::{self, Body}; use rustc_target::abi::call::{FnAbi, PassMode}; use crate::base; -- cgit 1.4.1-3-g733a5 From 0ea40ec76ab12cb1e25bdc03a6bd7c85e65eff21 Mon Sep 17 00:00:00 2001 From: Eduard-Mihai Burtescu Date: Tue, 29 Oct 2019 19:29:42 +0200 Subject: rustc_codegen_ssa: rename ArgTypeMethods to ArgAbiMethods. --- src/librustc_codegen_llvm/abi.rs | 2 +- src/librustc_codegen_ssa/traits/builder.rs | 4 ++-- src/librustc_codegen_ssa/traits/mod.rs | 2 +- src/librustc_codegen_ssa/traits/type_.rs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/librustc_codegen_llvm') diff --git a/src/librustc_codegen_llvm/abi.rs b/src/librustc_codegen_llvm/abi.rs index 31e2fb3eccb..0d021cdc237 100644 --- a/src/librustc_codegen_llvm/abi.rs +++ b/src/librustc_codegen_llvm/abi.rs @@ -279,7 +279,7 @@ impl ArgAbiExt<'ll, 'tcx> for ArgAbi<'tcx, Ty<'tcx>> { } } -impl ArgTypeMethods<'tcx> for Builder<'a, 'll, 'tcx> { +impl ArgAbiMethods<'tcx> for Builder<'a, 'll, 'tcx> { fn store_fn_arg( &mut self, arg_abi: &ArgAbi<'tcx, Ty<'tcx>>, diff --git a/src/librustc_codegen_ssa/traits/builder.rs b/src/librustc_codegen_ssa/traits/builder.rs index 62b5bcbb6c9..ebbea6e7bf5 100644 --- a/src/librustc_codegen_ssa/traits/builder.rs +++ b/src/librustc_codegen_ssa/traits/builder.rs @@ -2,7 +2,7 @@ use super::abi::AbiBuilderMethods; use super::asm::AsmBuilderMethods; use super::debuginfo::DebugInfoBuilderMethods; use super::intrinsic::IntrinsicCallMethods; -use super::type_::ArgTypeMethods; +use super::type_::ArgAbiMethods; use super::{HasCodegen, StaticBuilderMethods}; use crate::common::{AtomicOrdering, AtomicRmwBinOp, IntPredicate, RealPredicate, SynchronizationScope}; @@ -25,7 +25,7 @@ pub enum OverflowOp { pub trait BuilderMethods<'a, 'tcx>: HasCodegen<'tcx> + DebugInfoBuilderMethods<'tcx> - + ArgTypeMethods<'tcx> + + ArgAbiMethods<'tcx> + AbiBuilderMethods<'tcx> + IntrinsicCallMethods<'tcx> + AsmBuilderMethods<'tcx> diff --git a/src/librustc_codegen_ssa/traits/mod.rs b/src/librustc_codegen_ssa/traits/mod.rs index 4318ef16494..89982b9ea62 100644 --- a/src/librustc_codegen_ssa/traits/mod.rs +++ b/src/librustc_codegen_ssa/traits/mod.rs @@ -38,7 +38,7 @@ pub use self::intrinsic::IntrinsicCallMethods; pub use self::misc::MiscMethods; pub use self::statics::{StaticMethods, StaticBuilderMethods}; pub use self::type_::{ - ArgTypeMethods, BaseTypeMethods, DerivedTypeMethods, LayoutTypeMethods, TypeMethods, + ArgAbiMethods, BaseTypeMethods, DerivedTypeMethods, LayoutTypeMethods, TypeMethods, }; pub use self::write::{ModuleBufferMethods, ThinBufferMethods, WriteBackendMethods}; use rustc::ty::layout::{HasParamEnv, HasTyCtxt}; diff --git a/src/librustc_codegen_ssa/traits/type_.rs b/src/librustc_codegen_ssa/traits/type_.rs index 77280e155e0..f074d4479fa 100644 --- a/src/librustc_codegen_ssa/traits/type_.rs +++ b/src/librustc_codegen_ssa/traits/type_.rs @@ -110,7 +110,7 @@ pub trait LayoutTypeMethods<'tcx>: Backend<'tcx> { ) -> Self::Type; } -pub trait ArgTypeMethods<'tcx>: HasCodegen<'tcx> { +pub trait ArgAbiMethods<'tcx>: HasCodegen<'tcx> { fn store_fn_arg( &mut self, arg_abi: &ArgAbi<'tcx, Ty<'tcx>>, -- cgit 1.4.1-3-g733a5 From 8b06209c2883906427978305b854faa90e61a5c0 Mon Sep 17 00:00:00 2001 From: Eduard-Mihai Burtescu Date: Tue, 29 Oct 2019 19:30:31 +0200 Subject: rustc_codegen_ssa: rename FnTypeLlvmExt to FnAbiLlvmExt. --- src/librustc_codegen_llvm/abi.rs | 4 ++-- src/librustc_codegen_llvm/declare.rs | 2 +- src/librustc_codegen_llvm/type_.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/librustc_codegen_llvm') diff --git a/src/librustc_codegen_llvm/abi.rs b/src/librustc_codegen_llvm/abi.rs index 0d021cdc237..287d5705de8 100644 --- a/src/librustc_codegen_llvm/abi.rs +++ b/src/librustc_codegen_llvm/abi.rs @@ -300,7 +300,7 @@ impl ArgAbiMethods<'tcx> for Builder<'a, 'll, 'tcx> { } } -pub trait FnTypeLlvmExt<'tcx> { +pub trait FnAbiLlvmExt<'tcx> { fn llvm_type(&self, cx: &CodegenCx<'ll, 'tcx>) -> &'ll Type; fn ptr_to_llvm_type(&self, cx: &CodegenCx<'ll, 'tcx>) -> &'ll Type; fn llvm_cconv(&self) -> llvm::CallConv; @@ -308,7 +308,7 @@ pub trait FnTypeLlvmExt<'tcx> { fn apply_attrs_callsite(&self, bx: &mut Builder<'a, 'll, 'tcx>, callsite: &'ll Value); } -impl<'tcx> FnTypeLlvmExt<'tcx> for FnAbi<'tcx, Ty<'tcx>> { +impl<'tcx> FnAbiLlvmExt<'tcx> for FnAbi<'tcx, Ty<'tcx>> { fn llvm_type(&self, cx: &CodegenCx<'ll, 'tcx>) -> &'ll Type { let args_capacity: usize = self.args.iter().map(|arg| if arg.pad.is_some() { 1 } else { 0 } + diff --git a/src/librustc_codegen_llvm/declare.rs b/src/librustc_codegen_llvm/declare.rs index 1fe97001fc9..46cdd2aaa96 100644 --- a/src/librustc_codegen_llvm/declare.rs +++ b/src/librustc_codegen_llvm/declare.rs @@ -13,7 +13,7 @@ use crate::llvm; use crate::llvm::AttributePlace::Function; -use crate::abi::{FnAbi, FnTypeLlvmExt}; +use crate::abi::{FnAbi, FnAbiLlvmExt}; use crate::attributes; use crate::context::CodegenCx; use crate::type_::Type; diff --git a/src/librustc_codegen_llvm/type_.rs b/src/librustc_codegen_llvm/type_.rs index bd08052014d..f936367572e 100644 --- a/src/librustc_codegen_llvm/type_.rs +++ b/src/librustc_codegen_llvm/type_.rs @@ -8,7 +8,7 @@ use rustc_codegen_ssa::traits::*; use crate::common; use crate::type_of::LayoutLlvmExt; -use crate::abi::{LlvmType, FnTypeLlvmExt}; +use crate::abi::{LlvmType, FnAbiLlvmExt}; use syntax::ast; use rustc::ty::Ty; use rustc::ty::layout::{self, Align, Size, TyLayout}; -- cgit 1.4.1-3-g733a5