]> git.proxmox.com Git - rustc.git/blame - src/librustc_trans/lib.rs
Imported Upstream version 1.9.0+dfsg1
[rustc.git] / src / librustc_trans / lib.rs
CommitLineData
1a4d82fc
JJ
1// Copyright 2012-2013 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//! The Rust compiler.
12//!
13//! # Note
14//!
15//! This API is completely unstable and subject to change.
16
17#![crate_name = "rustc_trans"]
e9174d1e 18#![unstable(feature = "rustc_private", issue = "27812")]
1a4d82fc
JJ
19#![crate_type = "dylib"]
20#![crate_type = "rlib"]
e9174d1e 21#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
62682a34 22 html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
e9174d1e 23 html_root_url = "https://doc.rust-lang.org/nightly/")]
7453a54e 24#![cfg_attr(not(stage0), deny(warnings))]
1a4d82fc 25
85aaf69f 26#![feature(box_patterns)]
1a4d82fc 27#![feature(box_syntax)]
62682a34 28#![feature(const_fn)]
b039eaaf
SL
29#![feature(custom_attribute)]
30#![allow(unused_attributes)]
62682a34 31#![feature(iter_arith)]
85aaf69f 32#![feature(libc)]
85aaf69f 33#![feature(quote)]
1a4d82fc 34#![feature(rustc_diagnostic_macros)]
85aaf69f 35#![feature(rustc_private)]
92a42be0 36#![feature(slice_patterns)]
85aaf69f 37#![feature(staged_api)]
85aaf69f 38#![feature(unicode)]
54a0048b 39#![feature(question_mark)]
c34b1796 40
1a4d82fc
JJ
41extern crate arena;
42extern crate flate;
43extern crate getopts;
44extern crate graphviz;
45extern crate libc;
54a0048b 46#[macro_use] extern crate rustc;
1a4d82fc 47extern crate rustc_back;
92a42be0 48extern crate rustc_data_structures;
54a0048b 49extern crate rustc_incremental;
7453a54e 50pub extern crate rustc_llvm as llvm;
92a42be0 51extern crate rustc_mir;
e9174d1e 52extern crate rustc_platform_intrinsics as intrinsics;
c1a9b12d 53extern crate serialize;
54a0048b
SL
54extern crate rustc_const_math;
55extern crate rustc_const_eval;
1a4d82fc
JJ
56
57#[macro_use] extern crate log;
58#[macro_use] extern crate syntax;
59
60pub use rustc::session;
1a4d82fc
JJ
61pub use rustc::middle;
62pub use rustc::lint;
1a4d82fc
JJ
63pub use rustc::util;
64
54a0048b
SL
65pub use base::trans_crate;
66pub use disr::Disr;
67
1a4d82fc 68pub mod back {
1a4d82fc 69 pub use rustc_back::rpath;
54a0048b 70 pub use rustc::hir::svh;
1a4d82fc 71
c1a9b12d 72 pub mod archive;
62682a34 73 pub mod linker;
1a4d82fc
JJ
74 pub mod link;
75 pub mod lto;
54a0048b 76 pub mod symbol_names;
1a4d82fc 77 pub mod write;
c1a9b12d 78 pub mod msvc;
1a4d82fc
JJ
79}
80
b039eaaf
SL
81pub mod diagnostics;
82
54a0048b
SL
83#[macro_use]
84mod macros;
85
86mod abi;
87mod adt;
88mod asm;
89mod attributes;
90mod base;
91mod basic_block;
92mod build;
93mod builder;
94mod cabi_aarch64;
95mod cabi_arm;
96mod cabi_asmjs;
97mod cabi_mips;
98mod cabi_powerpc;
99mod cabi_powerpc64;
100mod cabi_x86;
101mod cabi_x86_64;
102mod cabi_x86_win64;
103mod callee;
104mod cleanup;
105mod closure;
106mod common;
107mod consts;
108mod context;
109mod controlflow;
110mod datum;
111mod debuginfo;
112mod declare;
113mod disr;
114mod expr;
115mod glue;
116mod inline;
117mod intrinsic;
118mod machine;
119mod _match;
120mod meth;
121mod mir;
122mod monomorphize;
123mod collector;
124mod symbol_names_test;
125mod tvec;
126mod type_;
127mod type_of;
128mod value;
129
130#[derive(Copy, Clone)]
131pub struct ModuleTranslation {
132 pub llcx: llvm::ContextRef,
133 pub llmod: llvm::ModuleRef,
134}
135
136unsafe impl Send for ModuleTranslation { }
137unsafe impl Sync for ModuleTranslation { }
1a4d82fc 138
54a0048b
SL
139pub struct CrateTranslation {
140 pub modules: Vec<ModuleTranslation>,
141 pub metadata_module: ModuleTranslation,
142 pub link: middle::cstore::LinkMeta,
143 pub metadata: Vec<u8>,
144 pub reachable: Vec<String>,
145 pub no_builtins: bool,
1a4d82fc 146}
92a42be0
SL
147
148__build_diagnostic_array! { librustc_trans, DIAGNOSTICS }