]> git.lizzy.rs Git - rust.git/blob - src/librustc_trans/trans/mod.rs
2e71128a1e78bd8f9e646b4d5fdfab7f837f6128
[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 middle::cstore::LinkMeta;
13
14 pub use self::base::trans_crate;
15 pub use self::context::CrateContext;
16 pub use self::common::gensym_name;
17 pub use self::disr::Disr;
18 pub use self::monomorphize::Instance;
19
20 #[macro_use]
21 mod macros;
22
23 mod abi;
24 mod adt;
25 mod asm;
26 mod assert_dep_graph;
27 mod attributes;
28 mod base;
29 mod basic_block;
30 mod build;
31 mod builder;
32 mod cabi_aarch64;
33 mod cabi_arm;
34 mod cabi_asmjs;
35 mod cabi_mips;
36 mod cabi_powerpc;
37 mod cabi_powerpc64;
38 mod cabi_x86;
39 mod cabi_x86_64;
40 mod cabi_x86_win64;
41 mod callee;
42 mod cleanup;
43 mod closure;
44 mod common;
45 mod consts;
46 mod context;
47 mod controlflow;
48 mod datum;
49 mod debuginfo;
50 mod declare;
51 mod disr;
52 mod expr;
53 mod glue;
54 mod inline;
55 mod intrinsic;
56 pub mod link_guard;
57 mod machine;
58 mod _match;
59 mod meth;
60 mod mir;
61 mod monomorphize;
62 mod collector;
63 mod tvec;
64 mod type_;
65 mod type_of;
66 mod value;
67
68 #[derive(Copy, Clone)]
69 pub struct ModuleTranslation {
70     pub llcx: ContextRef,
71     pub llmod: ModuleRef,
72 }
73
74 unsafe impl Send for ModuleTranslation { }
75 unsafe impl Sync for ModuleTranslation { }
76
77 pub struct CrateTranslation {
78     pub modules: Vec<ModuleTranslation>,
79     pub metadata_module: ModuleTranslation,
80     pub link: LinkMeta,
81     pub metadata: Vec<u8>,
82     pub reachable: Vec<String>,
83     pub no_builtins: bool,
84 }