1 // Copyright 2018 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
22 pub use self::abi::{AbiBuilderMethods, AbiMethods};
23 pub use self::asm::{AsmBuilderMethods, AsmMethods};
24 pub use self::builder::BuilderMethods;
25 pub use self::consts::ConstMethods;
26 pub use self::debuginfo::{DebugInfoBuilderMethods, DebugInfoMethods};
27 pub use self::declare::{DeclareMethods, PreDefineMethods};
28 pub use self::intrinsic::{IntrinsicCallMethods, IntrinsicDeclarationMethods};
29 pub use self::misc::MiscMethods;
30 pub use self::statics::StaticMethods;
31 pub use self::type_::{
32 ArgTypeMethods, BaseTypeMethods, DerivedTypeMethods, LayoutTypeMethods, TypeMethods,
34 pub use rustc_codegen_utils::interfaces::{Backend, BackendMethods, BackendTypes, CodegenObject};
36 pub trait CodegenMethods<'tcx>:
42 + DebugInfoMethods<'tcx>
44 + IntrinsicDeclarationMethods<'tcx>
45 + DeclareMethods<'tcx>
47 + PreDefineMethods<'tcx>
51 impl<'tcx, T> CodegenMethods<'tcx> for T where
57 + DebugInfoMethods<'tcx>
59 + IntrinsicDeclarationMethods<'tcx>
60 + DeclareMethods<'tcx>
62 + PreDefineMethods<'tcx>
65 pub trait HasCodegen<'tcx>: Backend<'tcx> {
66 type CodegenCx: CodegenMethods<'tcx>
69 BasicBlock = Self::BasicBlock,
71 Context = Self::Context,
72 Funclet = Self::Funclet,
73 DIScope = Self::DIScope,