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.
20 pub use self::backend::{Backend, BackendTypes};
21 pub use self::builder::BuilderMethods;
22 pub use self::consts::ConstMethods;
23 pub use self::debuginfo::DebugInfoMethods;
24 pub use self::intrinsic::{IntrinsicCallMethods, IntrinsicDeclarationMethods};
25 pub use self::misc::MiscMethods;
26 pub use self::statics::StaticMethods;
27 pub use self::type_::{BaseTypeMethods, DerivedTypeMethods, LayoutTypeMethods, TypeMethods};
31 pub trait CodegenMethods<'tcx>:
37 + DebugInfoMethods<'tcx>
41 impl<'tcx, T> CodegenMethods<'tcx> for T where
47 + DebugInfoMethods<'tcx>
50 pub trait HasCodegen<'tcx>: Backend<'tcx> {
51 type CodegenCx: CodegenMethods<'tcx>
54 BasicBlock = Self::BasicBlock,
56 Context = Self::Context,
60 pub trait CodegenObject: Copy + PartialEq + fmt::Debug {}
61 impl<T: Copy + PartialEq + fmt::Debug> CodegenObject for T {}