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