Skip to content

Commit 8bf728f

Browse files
committed
---
yaml --- r: 12779 b: refs/heads/master c: ecf290d h: refs/heads/master i: 12777: 14cfa04 12775: 2f5863b v: v3
1 parent a5b926d commit 8bf728f

File tree

3 files changed

+60
-1
lines changed

3 files changed

+60
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: a6b9fa0cd1a6eb29a127e05d10910d8b8f194f59
2+
refs/heads/master: ecf290d448e1b46e073bd8727c04156a06948bf5
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
55
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf

trunk/src/rustc/metadata.rs

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
// Define the rustc API's that the metadata module has access to
2+
// Over time we will reduce these dependencies and, once metadata has
3+
// no dependencies on rustc it can move into its own crate.
4+
5+
mod middle {
6+
import ast_map = middle_::ast_map;
7+
export ast_map;
8+
import ty = middle_::ty;
9+
export ty;
10+
import trans = middle_::trans;
11+
export trans;
12+
import typeck = middle_::typeck;
13+
export typeck;
14+
import last_use = middle_::last_use;
15+
export last_use;
16+
import freevars = middle_::freevars;
17+
export freevars;
18+
import resolve = middle_::resolve;
19+
export resolve;
20+
}
21+
22+
mod front {
23+
}
24+
25+
mod back {
26+
}
27+
28+
mod driver {
29+
import session = driver_::session;
30+
export session;
31+
import diagnostic = rustsyntax::diagnostic;
32+
export diagnostic;
33+
}
34+
35+
mod util {
36+
import common = util_::common;
37+
export common;
38+
import ppaux = util_::ppaux;
39+
export ppaux;
40+
import filesearch = util_::filesearch;
41+
export filesearch;
42+
}
43+
44+
mod lib {
45+
import llvm = lib_::llvm;
46+
export llvm;
47+
}

trunk/src/rustc/rustc.rc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,18 @@ use rustsyntax(vers = "0.2");
1717

1818
import core::*;
1919

20+
/*
21+
Alternate names for some modules.
22+
23+
I am using this to help extract metadata into its own crate. In metadata.rs
24+
it redefines all these modules in order to gate access from metadata to the
25+
rest of the compiler, then uses these to access the original implementation.
26+
*/
27+
import util_ = util;
28+
import lib_ = lib;
29+
import driver_ = driver;
30+
import middle_ = middle;
31+
2032
mod middle {
2133
mod trans {
2234
mod common;

0 commit comments

Comments
 (0)