Skip to content

Commit bbe1d28

Browse files
Move the core MIR datastructures to librustc.
This is done mostly so that we can refer to MIR types in csearch and other metadata related area.
1 parent 52d95e6 commit bbe1d28

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+70
-61
lines changed

src/librustc/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,11 @@ pub mod middle {
136136
pub mod weak_lang_items;
137137
}
138138

139+
pub mod mir {
140+
pub mod repr;
141+
pub mod tcx;
142+
}
143+
139144
pub mod session;
140145

141146
pub mod lint;

src/librustc_mir/repr.rs renamed to src/librustc/mir/repr.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use rustc::middle::const_eval::ConstVal;
12-
use rustc::middle::def_id::DefId;
13-
use rustc::middle::subst::Substs;
14-
use rustc::middle::ty::{AdtDef, ClosureSubsts, FnOutput, Region, Ty};
11+
use middle::const_eval::ConstVal;
12+
use middle::def_id::DefId;
13+
use middle::subst::Substs;
14+
use middle::ty::{AdtDef, ClosureSubsts, FnOutput, Region, Ty};
1515
use rustc_back::slice;
1616
use rustc_front::hir::InlineAsm;
1717
use syntax::ast::Name;

src/librustc_mir/tcx/mod.rs renamed to src/librustc/mir/tcx.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
* building is complete.
1414
*/
1515

16-
use repr::*;
17-
use rustc::middle::subst::Substs;
18-
use rustc::middle::ty::{self, AdtDef, Ty};
16+
use mir::repr::*;
17+
use middle::subst::Substs;
18+
use middle::ty::{self, AdtDef, Ty};
1919
use rustc_front::hir;
2020

2121
#[derive(Copy, Clone, Debug)]

src/librustc_mir/build/block.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
use build::{BlockAnd, Builder};
1212
use hair::*;
13-
use repr::*;
13+
use rustc::mir::repr::*;
1414
use rustc_front::hir;
1515

1616
impl<'a,'tcx> Builder<'a,'tcx> {

src/librustc_mir/build/cfg.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
//! Routines for manipulating the control-flow graph.
1515
1616
use build::CFG;
17-
use repr::*;
17+
use rustc::mir::repr::*;
1818
use syntax::codemap::Span;
1919

2020
impl<'tcx> CFG<'tcx> {

src/librustc_mir/build/expr/as_constant.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
1313
use build::Builder;
1414
use hair::*;
15-
use repr::*;
15+
use rustc::mir::repr::*;
1616

1717
impl<'a,'tcx> Builder<'a,'tcx> {
1818
/// Compile `expr`, yielding a compile-time constant. Assumes that

src/librustc_mir/build/expr/as_lvalue.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010

1111
//! See docs in build/expr/mod.rs
1212
13-
use build::{BlockAnd, Builder};
13+
use build::{BlockAnd, BlockAndExtension, Builder};
1414
use build::expr::category::Category;
1515
use hair::*;
16-
use repr::*;
16+
use rustc::mir::repr::*;
1717

1818
impl<'a,'tcx> Builder<'a,'tcx> {
1919
/// Compile `expr`, yielding an lvalue that we can move from etc.

src/librustc_mir/build/expr/as_operand.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010

1111
//! See docs in build/expr/mod.rs
1212
13-
use build::{BlockAnd, Builder};
13+
use build::{BlockAnd, BlockAndExtension, Builder};
1414
use build::expr::category::Category;
1515
use hair::*;
16-
use repr::*;
16+
use rustc::mir::repr::*;
1717

1818
impl<'a,'tcx> Builder<'a,'tcx> {
1919
/// Compile `expr` into a value that can be used as an operand.

src/librustc_mir/build/expr/as_rvalue.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
1313
use rustc_data_structures::fnv::FnvHashMap;
1414

15-
use build::{BlockAnd, Builder};
15+
use build::{BlockAnd, BlockAndExtension, Builder};
1616
use build::expr::category::{Category, RvalueFunc};
1717
use hair::*;
18-
use repr::*;
18+
use rustc::mir::repr::*;
1919

2020
impl<'a,'tcx> Builder<'a,'tcx> {
2121
/// Compile `expr`, yielding an rvalue.

src/librustc_mir/build/expr/as_temp.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010

1111
//! See docs in build/expr/mod.rs
1212
13-
use build::{BlockAnd, Builder};
13+
use build::{BlockAnd, BlockAndExtension, Builder};
1414
use build::expr::category::Category;
1515
use hair::*;
16-
use repr::*;
16+
use rustc::mir::repr::*;
1717

1818
impl<'a,'tcx> Builder<'a,'tcx> {
1919
/// Compile `expr` into a fresh temporary. This is used when building

0 commit comments

Comments
 (0)