diff --git a/src/librustc/lib.rs b/src/librustc/lib.rs index 3988545c201e0ad7fd62e18ba2196e7c47186941..d2ca1cd3f9339ca1a206d2a3dca1b6892bb734be 100644 --- a/src/librustc/lib.rs +++ b/src/librustc/lib.rs @@ -73,7 +73,6 @@ pub mod diagnostics; pub mod back { - pub use rustc_back::abi; pub use rustc_back::rpath; pub use rustc_back::svh; } diff --git a/src/librustc_back/abi.rs b/src/librustc_back/abi.rs deleted file mode 100644 index c3a3a8d582aff91f2fc400141e0b57d16d605234..0000000000000000000000000000000000000000 --- a/src/librustc_back/abi.rs +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright 2012 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -pub const BOX_FIELD_DROP_GLUE: usize = 1; -pub const BOX_FIELD_BODY: usize = 4; - -/// The first half of a fat pointer. -/// - For a closure, this is the code address. -/// - For an object or trait instance, this is the address of the box. -/// - For a slice, this is the base address. -pub const FAT_PTR_ADDR: usize = 0; - -/// The second half of a fat pointer. -/// - For a closure, this is the address of the environment. -/// - For an object or trait instance, this is the address of the vtable. -/// - For a slice, this is the length. -pub const FAT_PTR_EXTRA: usize = 1; diff --git a/src/librustc_back/lib.rs b/src/librustc_back/lib.rs index 2b677d665d4f3355ed013bb12abad9a72a9d0aac..3ffc031d621f4a2c5f8282b31035be77578f543b 100644 --- a/src/librustc_back/lib.rs +++ b/src/librustc_back/lib.rs @@ -48,7 +48,6 @@ extern crate rustc_front; #[macro_use] extern crate log; -pub mod abi; pub mod tempdir; pub mod rpath; pub mod sha2; diff --git a/src/librustc_trans/lib.rs b/src/librustc_trans/lib.rs index d7e79e46720b37749bf14110bc5ba8f8bcd2a38e..c8ce09b4d79754d93040182ff98cf2f1b1f41325 100644 --- a/src/librustc_trans/lib.rs +++ b/src/librustc_trans/lib.rs @@ -61,7 +61,6 @@ pub use rustc::util; pub mod back { - pub use rustc_back::abi; pub use rustc_back::rpath; pub use rustc_back::svh; diff --git a/src/librustc_trans/trans/cabi.rs b/src/librustc_trans/trans/abi.rs similarity index 93% rename from src/librustc_trans/trans/cabi.rs rename to src/librustc_trans/trans/abi.rs index 5325c667eb683b3f0e0603a1c8ec2455e0eb4b37..9aabceb6b0ee5785b04521adcaff1c0a5653450f 100644 --- a/src/librustc_trans/trans/cabi.rs +++ b/src/librustc_trans/trans/abi.rs @@ -1,4 +1,4 @@ -// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT +// Copyright 2012-2016 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // @@ -28,7 +28,19 @@ use middle::ty::{self, Ty}; -use syntax::abi::Abi; +pub use syntax::abi::Abi; + +/// The first half of a fat pointer. +/// - For a closure, this is the code address. +/// - For an object or trait instance, this is the address of the box. +/// - For a slice, this is the base address. +pub const FAT_PTR_ADDR: usize = 0; + +/// The second half of a fat pointer. +/// - For a closure, this is the address of the environment. +/// - For an object or trait instance, this is the address of the vtable. +/// - For a slice, this is the length. +pub const FAT_PTR_EXTRA: usize = 1; #[derive(Clone, Copy, PartialEq, Debug)] pub enum ArgKind { @@ -130,7 +142,7 @@ pub fn new<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>, abi: Abi, sig: &ty::FnSig<'tcx>, extra_args: &[Ty<'tcx>]) -> FnType { - use syntax::abi::Abi::*; + use self::Abi::*; let cconv = match ccx.sess().target.target.adjust_abi(abi) { RustIntrinsic => { // Intrinsics are emitted at the call site diff --git a/src/librustc_trans/trans/adt.rs b/src/librustc_trans/trans/adt.rs index c6c19a2a6c7b25fb262ed3ddd870c40807d058c2..798fbbe8fbf5699e2360feb1680c9629dfef44ff 100644 --- a/src/librustc_trans/trans/adt.rs +++ b/src/librustc_trans/trans/adt.rs @@ -48,13 +48,13 @@ use std::rc::Rc; use llvm::{ValueRef, True, IntEQ, IntNE}; -use back::abi::FAT_PTR_ADDR; use middle::subst; use middle::ty::{self, Ty, TyCtxt}; use syntax::ast; use syntax::attr; use syntax::attr::IntType; use trans::_match; +use trans::abi::FAT_PTR_ADDR; use trans::base::InitAlloca; use trans::build::*; use trans::cleanup; diff --git a/src/librustc_trans/trans/attributes.rs b/src/librustc_trans/trans/attributes.rs index d93d32f8e0d068b327fc411d397372d3cb800403..4bb2b13998f7872eaa48a6be01dc2c7e9fe8f152 100644 --- a/src/librustc_trans/trans/attributes.rs +++ b/src/librustc_trans/trans/attributes.rs @@ -15,10 +15,10 @@ use middle::infer; use middle::traits::ProjectionMode; use session::config::NoDebugInfo; -use syntax::abi::Abi; pub use syntax::attr::InlineAttr; use syntax::ast; use rustc_front::hir; +use trans::abi::Abi; use trans::base; use trans::common; use trans::context::CrateContext; diff --git a/src/librustc_trans/trans/base.rs b/src/librustc_trans/trans/base.rs index d177bb396c902e86f33a5b8d6ad48574777b4ae5..69b296edd306975c5de14896d009da8e218b092c 100644 --- a/src/librustc_trans/trans/base.rs +++ b/src/librustc_trans/trans/base.rs @@ -30,7 +30,7 @@ use super::ModuleTranslation; use back::link::mangle_exported_name; -use back::{link, abi}; +use back::link; use lint; use llvm::{BasicBlockRef, Linkage, ValueRef, Vector, get_param}; use llvm; @@ -52,6 +52,7 @@ use session::config::{self, NoDebugInfo, FullDebugInfo}; use session::Session; use trans::_match; +use trans::abi::{self, Abi}; use trans::adt; use trans::assert_dep_graph; use trans::attributes; @@ -100,7 +101,6 @@ use std::collections::{HashMap, HashSet}; use std::str; use std::{i8, i16, i32, i64}; -use syntax::abi::Abi; use syntax::codemap::{Span, DUMMY_SP}; use syntax::parse::token::InternedString; use syntax::attr::AttrMetaMethods; diff --git a/src/librustc_trans/trans/cabi_aarch64.rs b/src/librustc_trans/trans/cabi_aarch64.rs index 745cc3ba6d6f55c9ca93d5913382695a4decc7f4..1004505b3c4a06ac14fecd377be43b284b8cbc6e 100644 --- a/src/librustc_trans/trans/cabi_aarch64.rs +++ b/src/librustc_trans/trans/cabi_aarch64.rs @@ -11,7 +11,7 @@ #![allow(non_upper_case_globals)] use llvm::{Integer, Pointer, Float, Double, Struct, Array, Vector, Attribute}; -use trans::cabi::{FnType, ArgType}; +use trans::abi::{FnType, ArgType}; use trans::context::CrateContext; use trans::type_::Type; diff --git a/src/librustc_trans/trans/cabi_arm.rs b/src/librustc_trans/trans/cabi_arm.rs index c65fb588e7218d2572b3e040c747bfaac3051a06..12d6aa6341aa91d536562377dc9eb4dde6f223fa 100644 --- a/src/librustc_trans/trans/cabi_arm.rs +++ b/src/librustc_trans/trans/cabi_arm.rs @@ -11,7 +11,7 @@ #![allow(non_upper_case_globals)] use llvm::{Integer, Pointer, Float, Double, Struct, Array, Vector, Attribute}; -use trans::cabi::{FnType, ArgType}; +use trans::abi::{FnType, ArgType}; use trans::context::CrateContext; use trans::type_::Type; diff --git a/src/librustc_trans/trans/cabi_asmjs.rs b/src/librustc_trans/trans/cabi_asmjs.rs index dd62194a892a70888d7fdb5b5cc88aa4f33f8e83..752a7f3ca5c7cc1bc9dee5e1ead1f1607c2eb60d 100644 --- a/src/librustc_trans/trans/cabi_asmjs.rs +++ b/src/librustc_trans/trans/cabi_asmjs.rs @@ -11,7 +11,7 @@ #![allow(non_upper_case_globals)] use llvm::{Struct, Array, Attribute}; -use trans::cabi::{FnType, ArgType}; +use trans::abi::{FnType, ArgType}; use trans::context::CrateContext; use trans::type_::Type; diff --git a/src/librustc_trans/trans/cabi_mips.rs b/src/librustc_trans/trans/cabi_mips.rs index 74fdc0828f203fa93a185bd4993ae692284bdccb..1bab2f6e9aedae29d8337be018f030e67f20887f 100644 --- a/src/librustc_trans/trans/cabi_mips.rs +++ b/src/librustc_trans/trans/cabi_mips.rs @@ -14,7 +14,7 @@ use std::cmp; use llvm; use llvm::{Integer, Pointer, Float, Double, Struct, Array, Vector, Attribute}; -use trans::cabi::{ArgType, FnType}; +use trans::abi::{ArgType, FnType}; use trans::context::CrateContext; use trans::type_::Type; diff --git a/src/librustc_trans/trans/cabi_powerpc.rs b/src/librustc_trans/trans/cabi_powerpc.rs index 57d49926fae5d2fc8f8edfd1b88c33a5c853e666..0239f9fe928311e3f46331b9e40fadd0a820be7c 100644 --- a/src/librustc_trans/trans/cabi_powerpc.rs +++ b/src/librustc_trans/trans/cabi_powerpc.rs @@ -11,7 +11,7 @@ use libc::c_uint; use llvm; use llvm::{Integer, Pointer, Float, Double, Struct, Array, Attribute}; -use trans::cabi::{FnType, ArgType}; +use trans::abi::{FnType, ArgType}; use trans::context::CrateContext; use trans::type_::Type; diff --git a/src/librustc_trans/trans/cabi_powerpc64.rs b/src/librustc_trans/trans/cabi_powerpc64.rs index dd50b1164517d206c614f8c0871f716ddb03d970..842171c0d73ac012faceaed9a746f006d0c37f9b 100644 --- a/src/librustc_trans/trans/cabi_powerpc64.rs +++ b/src/librustc_trans/trans/cabi_powerpc64.rs @@ -16,7 +16,7 @@ // need to be fixed when PowerPC vector support is added. use llvm::{Integer, Pointer, Float, Double, Struct, Array, Attribute}; -use trans::cabi::{FnType, ArgType}; +use trans::abi::{FnType, ArgType}; use trans::context::CrateContext; use trans::type_::Type; diff --git a/src/librustc_trans/trans/cabi_x86.rs b/src/librustc_trans/trans/cabi_x86.rs index 81fb9d71210d861cbaaa4d1dd07705ff8572db86..256e656b9b691a2d76b14f230d284c6702f04c7c 100644 --- a/src/librustc_trans/trans/cabi_x86.rs +++ b/src/librustc_trans/trans/cabi_x86.rs @@ -9,7 +9,7 @@ // except according to those terms. use llvm::*; -use trans::cabi::{ArgType, FnType}; +use trans::abi::{ArgType, FnType}; use trans::type_::Type; use super::common::*; use super::machine::*; diff --git a/src/librustc_trans/trans/cabi_x86_64.rs b/src/librustc_trans/trans/cabi_x86_64.rs index 5946aa4a8c3668bfbae737eccd5a1d8f5d2785a3..12fd31cc96e7a9cea5ad93d5ad858df110605913 100644 --- a/src/librustc_trans/trans/cabi_x86_64.rs +++ b/src/librustc_trans/trans/cabi_x86_64.rs @@ -16,7 +16,7 @@ use llvm::{Integer, Pointer, Float, Double}; use llvm::{Struct, Array, Attribute, Vector}; -use trans::cabi::{ArgType, FnType}; +use trans::abi::{ArgType, FnType}; use trans::context::CrateContext; use trans::type_::Type; diff --git a/src/librustc_trans/trans/cabi_x86_win64.rs b/src/librustc_trans/trans/cabi_x86_win64.rs index 21c746a1e88967729b904e084223727317dc70f7..7e887b2ad70ff1d9cacf91f06bcefa42561fca74 100644 --- a/src/librustc_trans/trans/cabi_x86_win64.rs +++ b/src/librustc_trans/trans/cabi_x86_win64.rs @@ -11,7 +11,7 @@ use llvm::*; use super::common::*; use super::machine::*; -use trans::cabi::{ArgType, FnType}; +use trans::abi::{ArgType, FnType}; use trans::type_::Type; // Win64 ABI: http://msdn.microsoft.com/en-us/library/zthk2dkh.aspx diff --git a/src/librustc_trans/trans/callee.rs b/src/librustc_trans/trans/callee.rs index 65724405db1b379d639bb35afc83794bb249983b..4c5386799e9a81757ec98d57e37ea17fcc4227fb 100644 --- a/src/librustc_trans/trans/callee.rs +++ b/src/librustc_trans/trans/callee.rs @@ -27,6 +27,7 @@ use middle::subst::{Substs}; use middle::traits; use rustc::front::map as hir_map; +use trans::abi::Abi; use trans::adt; use trans::attributes; use trans::base; @@ -54,7 +55,6 @@ use middle::ty::{self, Ty, TyCtxt, TypeFoldable}; use rustc_front::hir; -use syntax::abi::Abi; use syntax::ast; use syntax::codemap::DUMMY_SP; use syntax::errors; diff --git a/src/librustc_trans/trans/closure.rs b/src/librustc_trans/trans/closure.rs index bc81b32ae450dcf46ccc861cd5b7a97296edcbd7..d4272e7918502663ac22c6bcbccc6215c27d71dc 100644 --- a/src/librustc_trans/trans/closure.rs +++ b/src/librustc_trans/trans/closure.rs @@ -14,6 +14,7 @@ use middle::def_id::DefId; use middle::infer; use middle::traits::ProjectionMode; +use trans::abi::Abi::RustCall; use trans::adt; use trans::attributes; use trans::base::*; @@ -32,7 +33,6 @@ use middle::ty; use session::config::FullDebugInfo; -use syntax::abi::Abi::RustCall; use syntax::ast; use syntax::attr::{ThinAttributes, ThinAttributesExt}; diff --git a/src/librustc_trans/trans/collector.rs b/src/librustc_trans/trans/collector.rs index 43d3cde0f687940858bdb316c5f7e6dae97b7a32..3170ee0bf48acc59983900b9b44b4d5ce162c01b 100644 --- a/src/librustc_trans/trans/collector.rs +++ b/src/librustc_trans/trans/collector.rs @@ -1261,7 +1261,7 @@ pub fn push_unique_type_name<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>, output.push_str("unsafe "); } - if abi != ::syntax::abi::Abi::Rust { + if abi != ::trans::abi::Abi::Rust { output.push_str("extern \""); output.push_str(abi.name()); output.push_str("\" "); diff --git a/src/librustc_trans/trans/common.rs b/src/librustc_trans/trans/common.rs index 655a57b6f20fb3372b083cdd542248051f435dd1..b9f9004d7ee268199e3afd3fd87fb5a082e78c82 100644 --- a/src/librustc_trans/trans/common.rs +++ b/src/librustc_trans/trans/common.rs @@ -22,6 +22,7 @@ use middle::infer; use middle::lang_items::LangItem; use middle::subst::Substs; +use trans::abi::Abi; use trans::base; use trans::build; use trans::builder::Builder; @@ -49,7 +50,6 @@ use std::ffi::CString; use std::cell::{Cell, RefCell}; -use syntax::abi::Abi; use syntax::ast; use syntax::codemap::{DUMMY_SP, Span}; use syntax::parse::token::InternedString; diff --git a/src/librustc_trans/trans/consts.rs b/src/librustc_trans/trans/consts.rs index f2b68c477f69b8f834f20696ccf04f22c4b5fcbe..31ad7054996056b5a1a0cca3254d66da5596fb40 100644 --- a/src/librustc_trans/trans/consts.rs +++ b/src/librustc_trans/trans/consts.rs @@ -9,7 +9,6 @@ // except according to those terms. -use back::abi; use llvm; use llvm::{ConstFCmp, ConstICmp, SetLinkage, SetUnnamedAddr}; use llvm::{InternalLinkage, ValueRef, Bool, True}; @@ -19,7 +18,7 @@ use middle::def::Def; use middle::def_id::DefId; use rustc::front::map as hir_map; -use trans::{adt, closure, debuginfo, expr, inline, machine}; +use trans::{abi, adt, closure, debuginfo, expr, inline, machine}; use trans::base::{self, exported_name, push_ctxt}; use trans::callee::Callee; use trans::collector::{self, TransItem}; diff --git a/src/librustc_trans/trans/debuginfo/mod.rs b/src/librustc_trans/trans/debuginfo/mod.rs index 15275a46e9b7773e2e122bbf70d2f9a047666df9..e9a6aed70089fe1b628e898adb1dca4bff0bba8f 100644 --- a/src/librustc_trans/trans/debuginfo/mod.rs +++ b/src/librustc_trans/trans/debuginfo/mod.rs @@ -32,6 +32,7 @@ use rustc_front; use rustc_front::hir; +use trans::abi::Abi; use trans::common::{NodeIdAndSpan, CrateContext, FunctionContext, Block}; use trans; use trans::{monomorphize, type_of}; @@ -49,7 +50,6 @@ use syntax::codemap::{Span, Pos}; use syntax::{ast, codemap}; -use syntax::abi::Abi; use syntax::attr::IntType; use syntax::parse::token::{self, special_idents}; diff --git a/src/librustc_trans/trans/debuginfo/type_names.rs b/src/librustc_trans/trans/debuginfo/type_names.rs index cc9067677b25b3cc3370d390b20c3c2be85e8c04..b71b7789affe2f87575160b5f61aa1372f87bc3b 100644 --- a/src/librustc_trans/trans/debuginfo/type_names.rs +++ b/src/librustc_trans/trans/debuginfo/type_names.rs @@ -107,7 +107,7 @@ pub fn push_debuginfo_type_name<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>, output.push_str("unsafe "); } - if abi != ::syntax::abi::Abi::Rust { + if abi != ::trans::abi::Abi::Rust { output.push_str("extern \""); output.push_str(abi.name()); output.push_str("\" "); diff --git a/src/librustc_trans/trans/declare.rs b/src/librustc_trans/trans/declare.rs index d77fd6f10a0b2a50cafc7bbd6a0bfe51dc9bb87f..848ed2c1211f435bfa3d0e0cf4495386b381c241 100644 --- a/src/librustc_trans/trans/declare.rs +++ b/src/librustc_trans/trans/declare.rs @@ -23,10 +23,9 @@ use middle::ty; use middle::infer; use middle::traits::ProjectionMode; -use syntax::abi::Abi; +use trans::abi::{Abi, FnType}; use trans::attributes; use trans::base; -use trans::cabi::FnType; use trans::context::CrateContext; use trans::type_::Type; use trans::type_of; diff --git a/src/librustc_trans/trans/expr.rs b/src/librustc_trans/trans/expr.rs index 102732eb1dcca1752e3a81022e4dbfabec9e611a..6ea407e7b443edaba1579238a437be2029b6c75e 100644 --- a/src/librustc_trans/trans/expr.rs +++ b/src/librustc_trans/trans/expr.rs @@ -51,12 +51,11 @@ pub use self::Dest::*; use self::lazy_binop_ty::*; -use back::abi; use llvm::{self, ValueRef, TypeKind}; use middle::const_qualif::ConstQualif; use middle::def::Def; use middle::subst::Substs; -use trans::{_match, adt, asm, base, closure, consts, controlflow}; +use trans::{_match, abi, adt, asm, base, closure, consts, controlflow}; use trans::base::*; use trans::build::*; use trans::callee::{Callee, ArgExprs, ArgOverloadedCall, ArgOverloadedOp}; diff --git a/src/librustc_trans/trans/foreign.rs b/src/librustc_trans/trans/foreign.rs index 0c8ac32ecc11370ab74e9888b863289bdbc2ffd9..0cf30aca94cd27a797633432c67712181af91a43 100644 --- a/src/librustc_trans/trans/foreign.rs +++ b/src/librustc_trans/trans/foreign.rs @@ -9,15 +9,15 @@ // except according to those terms. -use back::{abi, link}; +use back::link; use llvm::{ValueRef, get_param}; use llvm; use middle::weak_lang_items; +use trans::abi::{self, Abi, FnType}; use trans::attributes; use trans::base::{llvm_linkage_by_name, push_ctxt}; use trans::base; use trans::build::*; -use trans::cabi::FnType; use trans::common::*; use trans::debuginfo::DebugLoc; use trans::declare; @@ -35,7 +35,6 @@ use std::cmp; use std::iter::once; use libc::c_uint; -use syntax::abi::Abi; use syntax::attr; use syntax::parse::token::{InternedString, special_idents}; use syntax::ast; @@ -715,7 +714,4 @@ pub fn link_name(name: ast::Name, attrs: &[ast::Attribute]) -> InternedString { None => name.as_str(), } } -} - } - } } diff --git a/src/librustc_trans/trans/intrinsic.rs b/src/librustc_trans/trans/intrinsic.rs index 707d60e18a971ee1f7bc47b415895a0df131d95c..edca908e7ba04a3e5b1499235580a67f6435fcc6 100644 --- a/src/librustc_trans/trans/intrinsic.rs +++ b/src/librustc_trans/trans/intrinsic.rs @@ -18,6 +18,7 @@ use middle::infer; use middle::subst; use middle::subst::FnSpace; +use trans::abi::Abi; use trans::adt; use trans::attributes; use trans::base::*; @@ -40,7 +41,6 @@ use middle::subst::Substs; use rustc::dep_graph::DepNode; use rustc_front::hir; -use syntax::abi::Abi; use syntax::ast; use syntax::ptr::P; use syntax::parse::token; diff --git a/src/librustc_trans/trans/mir/block.rs b/src/librustc_trans/trans/mir/block.rs index 1bbb2447e6a3ccec81e19194e58101485b60bfc5..00babf6792f9a4fd177950407b84b47e03b9f93f 100644 --- a/src/librustc_trans/trans/mir/block.rs +++ b/src/librustc_trans/trans/mir/block.rs @@ -11,7 +11,7 @@ use llvm::{BasicBlockRef, ValueRef, OperandBundleDef}; use rustc::middle::ty; use rustc::mir::repr as mir; -use syntax::abi::Abi; +use trans::abi::Abi; use trans::adt; use trans::attributes; use trans::base; diff --git a/src/librustc_trans/trans/mir/constant.rs b/src/librustc_trans/trans/mir/constant.rs index 52a4995f594c872e70924128caa05994989750a7..21cd35ea045ae2ea501a48e3351d33acc85f26bd 100644 --- a/src/librustc_trans/trans/mir/constant.rs +++ b/src/librustc_trans/trans/mir/constant.rs @@ -8,12 +8,12 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use back::abi; use llvm::ValueRef; use middle::ty::{Ty, TypeFoldable}; use rustc::middle::const_eval::{self, ConstVal}; use rustc_const_eval::ConstInt::*; use rustc::mir::repr as mir; +use trans::abi; use trans::common::{self, BlockAndBuilder, C_bool, C_bytes, C_floating_f64, C_integral, C_str_slice, C_nil, C_undef}; use trans::consts; diff --git a/src/librustc_trans/trans/mod.rs b/src/librustc_trans/trans/mod.rs index 9d197742c1be37c0a2cf2c72d51b8f235620de2d..ff5ed35b8c08c1462b5d8c43f725f871a848650e 100644 --- a/src/librustc_trans/trans/mod.rs +++ b/src/librustc_trans/trans/mod.rs @@ -19,6 +19,7 @@ #[macro_use] mod macros; +mod abi; mod adt; mod asm; mod assert_dep_graph; @@ -27,7 +28,6 @@ mod basic_block; mod build; mod builder; -mod cabi; mod cabi_aarch64; mod cabi_arm; mod cabi_asmjs; diff --git a/src/librustc_trans/trans/monomorphize.rs b/src/librustc_trans/trans/monomorphize.rs index fcbf0bdf790b489dc7901e49752f71adf741ac3e..07dba8e6cc383cbc1be3134b38c1c787b27073c1 100644 --- a/src/librustc_trans/trans/monomorphize.rs +++ b/src/librustc_trans/trans/monomorphize.rs @@ -16,6 +16,7 @@ use middle::subst; use middle::subst::{Subst, Substs}; use middle::ty::fold::{TypeFolder, TypeFoldable}; +use trans::abi::Abi; use trans::attributes; use trans::base::{push_ctxt}; use trans::base::trans_fn; @@ -30,7 +31,6 @@ use rustc_front::hir; -use syntax::abi::Abi; use syntax::attr; use syntax::errors; diff --git a/src/librustc_trans/trans/type_of.rs b/src/librustc_trans/trans/type_of.rs index ee2d84a7be7e0be68b4ec63ce6acf239e8b9f5d7..b3beecfb9b8d565c2d5ff1600aec323197e2f8ef 100644 --- a/src/librustc_trans/trans/type_of.rs +++ b/src/librustc_trans/trans/type_of.rs @@ -13,15 +13,14 @@ use middle::def_id::DefId; use middle::infer; use middle::subst; +use trans::abi::{Abi, FnType}; use trans::adt; -use trans::cabi::FnType; use trans::common::*; use trans::machine; use middle::ty::{self, Ty, TypeFoldable}; use trans::type_::Type; -use syntax::abi::Abi; use syntax::ast; // LLVM doesn't like objects that are too big. Issue #17913