]> git.lizzy.rs Git - rust.git/blob - src/librustc_trans/trans/mod.rs
Auto merge of #23934 - lfairy:write-no-deref, r=alexcrichton
[rust.git] / src / librustc_trans / trans / mod.rs
1 // Copyright 2012-2015 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.
4 //
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.
10
11 use llvm::{ContextRef, ModuleRef};
12 use metadata::common::LinkMeta;
13 use middle::dependency_format;
14
15 pub use self::base::trans_crate;
16 pub use self::context::CrateContext;
17 pub use self::common::gensym_name;
18
19 #[macro_use]
20 mod macros;
21
22 mod inline;
23 mod monomorphize;
24 mod controlflow;
25 mod glue;
26 mod datum;
27 mod callee;
28 mod expr;
29 mod common;
30 mod context;
31 mod consts;
32 mod type_of;
33 mod build;
34 mod builder;
35 mod base;
36 mod _match;
37 mod closure;
38 mod tvec;
39 mod meth;
40 mod cabi;
41 mod cabi_x86;
42 mod cabi_x86_64;
43 mod cabi_x86_win64;
44 mod cabi_arm;
45 mod cabi_aarch64;
46 mod cabi_mips;
47 mod cabi_powerpc;
48 mod foreign;
49 mod intrinsic;
50 mod debuginfo;
51 mod machine;
52 mod adt;
53 mod asm;
54 mod type_;
55 mod value;
56 mod basic_block;
57 mod llrepr;
58 mod cleanup;
59
60 #[derive(Copy, Clone)]
61 pub struct ModuleTranslation {
62     pub llcx: ContextRef,
63     pub llmod: ModuleRef,
64 }
65
66 unsafe impl Send for ModuleTranslation { }
67 unsafe impl Sync for ModuleTranslation { }
68
69 pub struct CrateTranslation {
70     pub modules: Vec<ModuleTranslation>,
71     pub metadata_module: ModuleTranslation,
72     pub link: LinkMeta,
73     pub metadata: Vec<u8>,
74     pub reachable: Vec<String>,
75     pub crate_formats: dependency_format::Dependencies,
76     pub no_builtins: bool,
77 }