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.
23 pub use self::abi::{AbiBuilderMethods, AbiMethods};
24 pub use self::asm::{AsmBuilderMethods, AsmMethods};
25 pub use self::backend::{Backend, BackendMethods, BackendTypes};
26 pub use self::builder::BuilderMethods;
27 pub use self::consts::ConstMethods;
28 pub use self::debuginfo::{DebugInfoBuilderMethods, DebugInfoMethods};
29 pub use self::declare::{DeclareMethods, PreDefineMethods};
30 pub use self::intrinsic::{IntrinsicCallMethods, IntrinsicDeclarationMethods};
31 pub use self::misc::MiscMethods;
32 pub use self::statics::StaticMethods;
33 pub use self::type_::{
34 ArgTypeMethods, BaseTypeMethods, DerivedTypeMethods, LayoutTypeMethods, TypeMethods,
39 pub trait CodegenMethods<'tcx>:
45 + DebugInfoMethods<'tcx>
47 + IntrinsicDeclarationMethods<'tcx>
48 + DeclareMethods<'tcx>
50 + PreDefineMethods<'tcx>
54 impl<'tcx, T> CodegenMethods<'tcx> for T where
60 + DebugInfoMethods<'tcx>
62 + IntrinsicDeclarationMethods<'tcx>
63 + DeclareMethods<'tcx>
65 + PreDefineMethods<'tcx>
68 pub trait HasCodegen<'tcx>: Backend<'tcx> {
69 type CodegenCx: CodegenMethods<'tcx>
72 BasicBlock = Self::BasicBlock,
74 Context = Self::Context,
75 DIScope = Self::DIScope,
79 pub trait CodegenObject: Copy + PartialEq + fmt::Debug {}
80 impl<T: Copy + PartialEq + fmt::Debug> CodegenObject for T {}