mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 00:03:43 +00:00
Rename {ArgAbi,IntrinsicCall}Methods
.
They both are part of `BuilderMethods`, and so should have `Builder` in their name like all the other traits in `BuilderMethods`.
This commit is contained in:
parent
6a35b5c9ed
commit
410a2de0c0
@ -13,7 +13,7 @@ use rustc_codegen_ssa::errors::InvalidMonomorphization;
|
|||||||
use rustc_codegen_ssa::mir::operand::{OperandRef, OperandValue};
|
use rustc_codegen_ssa::mir::operand::{OperandRef, OperandValue};
|
||||||
use rustc_codegen_ssa::mir::place::{PlaceRef, PlaceValue};
|
use rustc_codegen_ssa::mir::place::{PlaceRef, PlaceValue};
|
||||||
use rustc_codegen_ssa::traits::{
|
use rustc_codegen_ssa::traits::{
|
||||||
ArgAbiMethods, BuilderMethods, ConstMethods, IntrinsicCallMethods,
|
ArgAbiBuilderMethods, BuilderMethods, ConstMethods, IntrinsicCallBuilderMethods,
|
||||||
};
|
};
|
||||||
#[cfg(feature = "master")]
|
#[cfg(feature = "master")]
|
||||||
use rustc_codegen_ssa::traits::{BaseTypeMethods, MiscMethods};
|
use rustc_codegen_ssa::traits::{BaseTypeMethods, MiscMethods};
|
||||||
@ -94,7 +94,7 @@ fn get_simple_intrinsic<'gcc, 'tcx>(
|
|||||||
Some(cx.context.get_builtin_function(gcc_name))
|
Some(cx.context.get_builtin_function(gcc_name))
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'gcc, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'a, 'gcc, 'tcx> {
|
impl<'a, 'gcc, 'tcx> IntrinsicCallBuilderMethods<'tcx> for Builder<'a, 'gcc, 'tcx> {
|
||||||
fn codegen_intrinsic_call(
|
fn codegen_intrinsic_call(
|
||||||
&mut self,
|
&mut self,
|
||||||
instance: Instance<'tcx>,
|
instance: Instance<'tcx>,
|
||||||
@ -448,7 +448,7 @@ impl<'a, 'gcc, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'a, 'gcc, 'tcx> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'gcc, 'tcx> ArgAbiMethods<'tcx> for Builder<'a, 'gcc, 'tcx> {
|
impl<'a, 'gcc, 'tcx> ArgAbiBuilderMethods<'tcx> for Builder<'a, 'gcc, 'tcx> {
|
||||||
fn store_fn_arg(
|
fn store_fn_arg(
|
||||||
&mut self,
|
&mut self,
|
||||||
arg_abi: &ArgAbi<'tcx, Ty<'tcx>>,
|
arg_abi: &ArgAbi<'tcx, Ty<'tcx>>,
|
||||||
|
@ -285,7 +285,7 @@ impl<'ll, 'tcx> ArgAbiExt<'ll, 'tcx> for ArgAbi<'tcx, Ty<'tcx>> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'ll, 'tcx> ArgAbiMethods<'tcx> for Builder<'_, 'll, 'tcx> {
|
impl<'ll, 'tcx> ArgAbiBuilderMethods<'tcx> for Builder<'_, 'll, 'tcx> {
|
||||||
fn store_fn_arg(
|
fn store_fn_arg(
|
||||||
&mut self,
|
&mut self,
|
||||||
arg_abi: &ArgAbi<'tcx, Ty<'tcx>>,
|
arg_abi: &ArgAbi<'tcx, Ty<'tcx>>,
|
||||||
|
@ -148,7 +148,7 @@ fn get_simple_intrinsic<'ll>(
|
|||||||
Some(cx.get_intrinsic(llvm_name))
|
Some(cx.get_intrinsic(llvm_name))
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'ll, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'_, 'll, 'tcx> {
|
impl<'ll, 'tcx> IntrinsicCallBuilderMethods<'tcx> for Builder<'_, 'll, 'tcx> {
|
||||||
fn codegen_intrinsic_call(
|
fn codegen_intrinsic_call(
|
||||||
&mut self,
|
&mut self,
|
||||||
instance: ty::Instance<'tcx>,
|
instance: ty::Instance<'tcx>,
|
||||||
|
@ -15,9 +15,9 @@ use super::asm::AsmBuilderMethods;
|
|||||||
use super::consts::ConstMethods;
|
use super::consts::ConstMethods;
|
||||||
use super::coverageinfo::CoverageInfoBuilderMethods;
|
use super::coverageinfo::CoverageInfoBuilderMethods;
|
||||||
use super::debuginfo::DebugInfoBuilderMethods;
|
use super::debuginfo::DebugInfoBuilderMethods;
|
||||||
use super::intrinsic::IntrinsicCallMethods;
|
use super::intrinsic::IntrinsicCallBuilderMethods;
|
||||||
use super::misc::MiscMethods;
|
use super::misc::MiscMethods;
|
||||||
use super::type_::{ArgAbiMethods, BaseTypeMethods, LayoutTypeMethods};
|
use super::type_::{ArgAbiBuilderMethods, BaseTypeMethods, LayoutTypeMethods};
|
||||||
use super::{BackendTypes, CodegenMethods, StaticBuilderMethods};
|
use super::{BackendTypes, CodegenMethods, StaticBuilderMethods};
|
||||||
use crate::common::{
|
use crate::common::{
|
||||||
AtomicOrdering, AtomicRmwBinOp, IntPredicate, RealPredicate, SynchronizationScope, TypeKind,
|
AtomicOrdering, AtomicRmwBinOp, IntPredicate, RealPredicate, SynchronizationScope, TypeKind,
|
||||||
@ -40,9 +40,9 @@ pub trait BuilderMethods<'a, 'tcx>:
|
|||||||
+ Deref<Target = Self::CodegenCx>
|
+ Deref<Target = Self::CodegenCx>
|
||||||
+ CoverageInfoBuilderMethods<'tcx>
|
+ CoverageInfoBuilderMethods<'tcx>
|
||||||
+ DebugInfoBuilderMethods
|
+ DebugInfoBuilderMethods
|
||||||
+ ArgAbiMethods<'tcx>
|
+ ArgAbiBuilderMethods<'tcx>
|
||||||
+ AbiBuilderMethods<'tcx>
|
+ AbiBuilderMethods<'tcx>
|
||||||
+ IntrinsicCallMethods<'tcx>
|
+ IntrinsicCallBuilderMethods<'tcx>
|
||||||
+ AsmBuilderMethods<'tcx>
|
+ AsmBuilderMethods<'tcx>
|
||||||
+ StaticBuilderMethods
|
+ StaticBuilderMethods
|
||||||
+ HasParamEnv<'tcx>
|
+ HasParamEnv<'tcx>
|
||||||
|
@ -5,7 +5,7 @@ use rustc_target::abi::call::FnAbi;
|
|||||||
use super::BackendTypes;
|
use super::BackendTypes;
|
||||||
use crate::mir::operand::OperandRef;
|
use crate::mir::operand::OperandRef;
|
||||||
|
|
||||||
pub trait IntrinsicCallMethods<'tcx>: BackendTypes {
|
pub trait IntrinsicCallBuilderMethods<'tcx>: BackendTypes {
|
||||||
/// Remember to add all intrinsics here, in `compiler/rustc_hir_analysis/src/check/mod.rs`,
|
/// Remember to add all intrinsics here, in `compiler/rustc_hir_analysis/src/check/mod.rs`,
|
||||||
/// and in `library/core/src/intrinsics.rs`; if you need access to any LLVM intrinsics,
|
/// and in `library/core/src/intrinsics.rs`; if you need access to any LLVM intrinsics,
|
||||||
/// add them to `compiler/rustc_codegen_llvm/src/context.rs`.
|
/// add them to `compiler/rustc_codegen_llvm/src/context.rs`.
|
||||||
|
@ -38,12 +38,12 @@ pub use self::consts::ConstMethods;
|
|||||||
pub use self::coverageinfo::CoverageInfoBuilderMethods;
|
pub use self::coverageinfo::CoverageInfoBuilderMethods;
|
||||||
pub use self::debuginfo::{DebugInfoBuilderMethods, DebugInfoMethods};
|
pub use self::debuginfo::{DebugInfoBuilderMethods, DebugInfoMethods};
|
||||||
pub use self::declare::PreDefineMethods;
|
pub use self::declare::PreDefineMethods;
|
||||||
pub use self::intrinsic::IntrinsicCallMethods;
|
pub use self::intrinsic::IntrinsicCallBuilderMethods;
|
||||||
pub use self::misc::MiscMethods;
|
pub use self::misc::MiscMethods;
|
||||||
pub use self::statics::{StaticBuilderMethods, StaticMethods};
|
pub use self::statics::{StaticBuilderMethods, StaticMethods};
|
||||||
pub use self::type_::{
|
pub use self::type_::{
|
||||||
ArgAbiMethods, BaseTypeMethods, DerivedTypeMethods, LayoutTypeMethods, TypeMembershipMethods,
|
ArgAbiBuilderMethods, BaseTypeMethods, DerivedTypeMethods, LayoutTypeMethods,
|
||||||
TypeMethods,
|
TypeMembershipMethods, TypeMethods,
|
||||||
};
|
};
|
||||||
pub use self::write::{ModuleBufferMethods, ThinBufferMethods, WriteBackendMethods};
|
pub use self::write::{ModuleBufferMethods, ThinBufferMethods, WriteBackendMethods};
|
||||||
|
|
||||||
|
@ -158,7 +158,7 @@ pub trait TypeMembershipMethods<'tcx>: BackendTypes {
|
|||||||
fn set_kcfi_type_metadata(&self, _function: Self::Function, _typeid: u32) {}
|
fn set_kcfi_type_metadata(&self, _function: Self::Function, _typeid: u32) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait ArgAbiMethods<'tcx>: BackendTypes {
|
pub trait ArgAbiBuilderMethods<'tcx>: BackendTypes {
|
||||||
fn store_fn_arg(
|
fn store_fn_arg(
|
||||||
&mut self,
|
&mut self,
|
||||||
arg_abi: &ArgAbi<'tcx, Ty<'tcx>>,
|
arg_abi: &ArgAbi<'tcx, Ty<'tcx>>,
|
||||||
|
Loading…
Reference in New Issue
Block a user