rustc_codegen_ssa/traits/
mod.rs
1mod abi;
15mod asm;
16mod backend;
17mod builder;
18mod consts;
19mod coverageinfo;
20mod debuginfo;
21mod declare;
22mod intrinsic;
23mod misc;
24mod statics;
25mod type_;
26mod write;
27
28use std::fmt;
29
30use rustc_middle::ty::Ty;
31use rustc_middle::ty::layout::{FnAbiOf, LayoutOf, TyAndLayout};
32use rustc_target::callconv::FnAbi;
33
34pub use self::abi::AbiBuilderMethods;
35pub use self::asm::{
36 AsmBuilderMethods, AsmCodegenMethods, GlobalAsmOperandRef, InlineAsmOperandRef,
37};
38pub use self::backend::{BackendTypes, CodegenBackend, ExtraBackendMethods};
39pub use self::builder::{BuilderMethods, OverflowOp};
40pub use self::consts::ConstCodegenMethods;
41pub use self::coverageinfo::CoverageInfoBuilderMethods;
42pub use self::debuginfo::{DebugInfoBuilderMethods, DebugInfoCodegenMethods};
43pub use self::declare::PreDefineCodegenMethods;
44pub use self::intrinsic::IntrinsicCallBuilderMethods;
45pub use self::misc::MiscCodegenMethods;
46pub use self::statics::{StaticBuilderMethods, StaticCodegenMethods};
47pub use self::type_::{
48 ArgAbiBuilderMethods, BaseTypeCodegenMethods, DerivedTypeCodegenMethods,
49 LayoutTypeCodegenMethods, TypeCodegenMethods, TypeMembershipCodegenMethods,
50};
51pub use self::write::{ModuleBufferMethods, ThinBufferMethods, WriteBackendMethods};
52
53pub trait CodegenObject = Copy + PartialEq + fmt::Debug;
54
55pub trait CodegenMethods<'tcx> = LayoutOf<'tcx, LayoutOfResult = TyAndLayout<'tcx>>
56 + FnAbiOf<'tcx, FnAbiOfResult = &'tcx FnAbi<'tcx, Ty<'tcx>>>
57 + TypeCodegenMethods<'tcx>
58 + ConstCodegenMethods
59 + StaticCodegenMethods
60 + DebugInfoCodegenMethods<'tcx>
61 + AsmCodegenMethods<'tcx>
62 + PreDefineCodegenMethods<'tcx>;