Rename supertraits of CodegenMethods
.
Supertraits of `BuilderMethods` are all called `XyzBuilderMethods`. Supertraits of `CodegenMethods` are all called `XyzMethods`. This commit changes the latter to `XyzCodegenMethods`, for consistency.
This commit is contained in:
parent
540fcc617a
commit
a8d22eb39e
39 changed files with 98 additions and 88 deletions
|
@ -1,5 +1,7 @@
|
|||
use gccjit::{LValue, RValue, ToRValue, Type};
|
||||
use rustc_codegen_ssa::traits::{BaseTypeMethods, ConstMethods, MiscMethods, StaticMethods};
|
||||
use rustc_codegen_ssa::traits::{
|
||||
BaseTypeCodegenMethods, ConstCodegenMethods, MiscCodegenMethods, StaticCodegenMethods,
|
||||
};
|
||||
use rustc_middle::mir::interpret::{ConstAllocation, GlobalAlloc, Scalar};
|
||||
use rustc_middle::mir::Mutability;
|
||||
use rustc_middle::ty::layout::LayoutOf;
|
||||
|
@ -55,7 +57,7 @@ pub fn type_is_pointer(typ: Type<'_>) -> bool {
|
|||
typ.get_pointee().is_some()
|
||||
}
|
||||
|
||||
impl<'gcc, 'tcx> ConstMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
|
||||
impl<'gcc, 'tcx> ConstCodegenMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
|
||||
fn const_null(&self, typ: Type<'gcc>) -> RValue<'gcc> {
|
||||
if type_is_pointer(typ) { self.context.new_null(typ) } else { self.const_int(typ, 0) }
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue