Refactor paths to middle::trans to mir::mono

This commit is contained in:
Maik Klein 2017-10-27 10:50:39 +02:00 committed by Ariel Ben-Yehuda
parent ae468ab38b
commit c06e3aa446
10 changed files with 14 additions and 15 deletions

View File

@ -136,7 +136,6 @@ pub mod middle {
pub mod recursion_limit; pub mod recursion_limit;
pub mod resolve_lifetime; pub mod resolve_lifetime;
pub mod stability; pub mod stability;
pub mod trans;
pub mod weak_lang_items; pub mod weak_lang_items;
} }

View File

@ -44,6 +44,7 @@ pub mod tcx;
pub mod visit; pub mod visit;
pub mod traversal; pub mod traversal;
pub mod interpret; pub mod interpret;
pub mod mono;
/// Types for locals /// Types for locals
type LocalDecls<'tcx> = IndexVec<Local, LocalDecl<'tcx>>; type LocalDecls<'tcx> = IndexVec<Local, LocalDecl<'tcx>>;

View File

@ -27,7 +27,7 @@ use middle::resolve_lifetime::{ResolveLifetimes, Region, ObjectLifetimeDefault};
use middle::stability::{self, DeprecationEntry}; use middle::stability::{self, DeprecationEntry};
use middle::lang_items::{LanguageItems, LangItem}; use middle::lang_items::{LanguageItems, LangItem};
use middle::exported_symbols::SymbolExportLevel; use middle::exported_symbols::SymbolExportLevel;
use middle::trans::{CodegenUnit, Stats}; use mir::mono::{CodegenUnit, Stats};
use mir; use mir;
use session::{CompileResult, CrateDisambiguator}; use session::{CompileResult, CrateDisambiguator};
use session::config::OutputFilenames; use session::config::OutputFilenames;

View File

@ -195,13 +195,13 @@ use rustc::hir::map as hir_map;
use rustc::hir::def_id::DefId; use rustc::hir::def_id::DefId;
use rustc::middle::const_val::ConstVal; use rustc::middle::const_val::ConstVal;
use rustc::middle::lang_items::{ExchangeMallocFnLangItem}; use rustc::middle::lang_items::{ExchangeMallocFnLangItem};
use rustc::middle::trans::MonoItem;
use rustc::traits; use rustc::traits;
use rustc::ty::subst::Substs; use rustc::ty::subst::Substs;
use rustc::ty::{self, TypeFoldable, Ty, TyCtxt}; use rustc::ty::{self, TypeFoldable, Ty, TyCtxt};
use rustc::ty::adjustment::CustomCoerceUnsized; use rustc::ty::adjustment::CustomCoerceUnsized;
use rustc::mir::{self, Location}; use rustc::mir::{self, Location};
use rustc::mir::visit::Visitor as MirVisitor; use rustc::mir::visit::Visitor as MirVisitor;
use rustc::mir::mono::MonoItem;
use monomorphize::{self, Instance}; use monomorphize::{self, Instance};
use rustc::util::nodemap::{FxHashSet, FxHashMap, DefIdMap}; use rustc::util::nodemap::{FxHashSet, FxHashMap, DefIdMap};

View File

@ -17,7 +17,6 @@
use monomorphize::Instance; use monomorphize::Instance;
use rustc::hir; use rustc::hir;
use rustc::hir::def_id::DefId; use rustc::hir::def_id::DefId;
use rustc::middle::trans::Linkage;
use rustc::session::config::OptLevel; use rustc::session::config::OptLevel;
use rustc::traits; use rustc::traits;
use rustc::ty::{self, Ty, TyCtxt}; use rustc::ty::{self, Ty, TyCtxt};
@ -26,11 +25,11 @@ use syntax::ast;
use syntax::attr::{self, InlineAttr}; use syntax::attr::{self, InlineAttr};
use std::fmt::{self, Write}; use std::fmt::{self, Write};
use std::iter; use std::iter;
use rustc::mir::mono::Linkage;
pub use rustc::middle::trans::MonoItem; pub use rustc::mir::mono::MonoItem;
pub fn linkage_by_name(name: &str) -> Option<Linkage> { pub fn linkage_by_name(name: &str) -> Option<Linkage> {
use rustc::middle::trans::Linkage::*; use rustc::mir::mono::Linkage::*;
// Use the names from src/llvm/docs/LangRef.rst here. Most types are only // Use the names from src/llvm/docs/LangRef.rst here. Most types are only
// applicable to variable declarations and may not really make sense for // applicable to variable declarations and may not really make sense for

View File

@ -101,7 +101,7 @@ use monomorphize::Instance;
use trans_item::{BaseMonoItemExt, InstantiationMode}; use trans_item::{BaseMonoItemExt, InstantiationMode};
use rustc::middle::weak_lang_items; use rustc::middle::weak_lang_items;
use rustc::middle::trans::MonoItem; use rustc::mir::mono::MonoItem;
use rustc::hir::def_id::DefId; use rustc::hir::def_id::DefId;
use rustc::hir::map as hir_map; use rustc::hir::map as hir_map;
use rustc::ty::{self, Ty, TyCtxt, TypeFoldable}; use rustc::ty::{self, Ty, TyCtxt, TypeFoldable};

View File

@ -38,8 +38,8 @@ use llvm;
use metadata; use metadata;
use rustc::hir::def_id::{CrateNum, DefId, LOCAL_CRATE}; use rustc::hir::def_id::{CrateNum, DefId, LOCAL_CRATE};
use rustc::middle::lang_items::StartFnLangItem; use rustc::middle::lang_items::StartFnLangItem;
use rustc::middle::trans::{Linkage, Visibility, Stats}; use rustc::mir::mono::{Linkage, Visibility, Stats};
use rustc::middle::cstore::EncodedMetadata; use rustc::middle::cstore::{EncodedMetadata};
use rustc::ty::{self, Ty, TyCtxt}; use rustc::ty::{self, Ty, TyCtxt};
use rustc::ty::layout::{self, Align, TyLayout, LayoutOf}; use rustc::ty::layout::{self, Align, TyLayout, LayoutOf};
use rustc::ty::maps::Providers; use rustc::ty::maps::Providers;

View File

@ -27,7 +27,7 @@ use type_::Type;
use type_of::PointeeInfo; use type_of::PointeeInfo;
use rustc_data_structures::base_n; use rustc_data_structures::base_n;
use rustc::middle::trans::Stats; use rustc::mir::mono::Stats;
use rustc_data_structures::stable_hasher::StableHashingContextProvider; use rustc_data_structures::stable_hasher::StableHashingContextProvider;
use rustc::session::config::{self, NoDebugInfo}; use rustc::session::config::{self, NoDebugInfo};
use rustc::session::Session; use rustc::session::Session;

View File

@ -107,7 +107,7 @@ use common;
use rustc::dep_graph::WorkProductId; use rustc::dep_graph::WorkProductId;
use rustc::hir::def_id::DefId; use rustc::hir::def_id::DefId;
use rustc::hir::map::DefPathData; use rustc::hir::map::DefPathData;
use rustc::middle::trans::{Linkage, Visibility}; use rustc::mir::mono::{Linkage, Visibility};
use rustc::ty::{self, TyCtxt, InstanceDef}; use rustc::ty::{self, TyCtxt, InstanceDef};
use rustc::ty::item_path::characteristic_def_id_of_type; use rustc::ty::item_path::characteristic_def_id_of_type;
use rustc::util::nodemap::{FxHashMap, FxHashSet}; use rustc::util::nodemap::{FxHashMap, FxHashSet};
@ -116,7 +116,7 @@ use syntax::ast::NodeId;
use syntax::symbol::{Symbol, InternedString}; use syntax::symbol::{Symbol, InternedString};
use trans_item::{MonoItem, BaseMonoItemExt, MonoItemExt, InstantiationMode}; use trans_item::{MonoItem, BaseMonoItemExt, MonoItemExt, InstantiationMode};
pub use rustc::middle::trans::CodegenUnit; pub use rustc::mir::mono::CodegenUnit;
pub enum PartitioningStrategy { pub enum PartitioningStrategy {
/// Generate one codegen unit per source-level module. /// Generate one codegen unit per source-level module.

View File

@ -25,7 +25,7 @@ use llvm;
use monomorphize::Instance; use monomorphize::Instance;
use type_of::LayoutLlvmExt; use type_of::LayoutLlvmExt;
use rustc::hir; use rustc::hir;
use rustc::middle::trans::{Linkage, Visibility}; use rustc::mir::mono::{Linkage, Visibility};
use rustc::ty::{self, TyCtxt, TypeFoldable}; use rustc::ty::{self, TyCtxt, TypeFoldable};
use rustc::ty::layout::LayoutOf; use rustc::ty::layout::LayoutOf;
use syntax::ast; use syntax::ast;
@ -34,7 +34,7 @@ use syntax_pos::Span;
use syntax_pos::symbol::Symbol; use syntax_pos::symbol::Symbol;
use std::fmt; use std::fmt;
pub use rustc::middle::trans::MonoItem; pub use rustc::mir::mono::MonoItem;
pub use rustc_mir::monomorphize::item::*; pub use rustc_mir::monomorphize::item::*;
pub use rustc_mir::monomorphize::item::MonoItemExt as BaseMonoItemExt; pub use rustc_mir::monomorphize::item::MonoItemExt as BaseMonoItemExt;