about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEduard-Mihai Burtescu <edy.burt@gmail.com>2017-06-14 12:27:43 +0300
committerEduard-Mihai Burtescu <edy.burt@gmail.com>2017-11-19 02:14:28 +0200
commitb8671bef977723bd5983fc3130910d2e5a8b6cd9 (patch)
tree5c88acf048ed128c38f4d7130e8d3a6b4d355454
parent386d59dc893375e4386d4f52b79b6c65a593be00 (diff)
downloadrust-b8671bef977723bd5983fc3130910d2e5a8b6cd9.tar.gz
rust-b8671bef977723bd5983fc3130910d2e5a8b6cd9.zip
rustc_trans: remove obsolete Type methods.
-rw-r--r--src/librustc_llvm/ffi.rs1
-rw-r--r--src/librustc_trans/context.rs11
-rw-r--r--src/librustc_trans/type_.rs10
3 files changed, 4 insertions, 18 deletions
diff --git a/src/librustc_llvm/ffi.rs b/src/librustc_llvm/ffi.rs
index d800129b0c0..4d02274eadd 100644
--- a/src/librustc_llvm/ffi.rs
+++ b/src/librustc_llvm/ffi.rs
@@ -585,7 +585,6 @@ extern "C" {
     pub fn LLVMVectorType(ElementType: TypeRef, ElementCount: c_uint) -> TypeRef;
 
     pub fn LLVMGetElementType(Ty: TypeRef) -> TypeRef;
-    pub fn LLVMGetArrayLength(ArrayTy: TypeRef) -> c_uint;
     pub fn LLVMGetVectorSize(VectorTy: TypeRef) -> c_uint;
 
     // Operations on other types
diff --git a/src/librustc_trans/context.rs b/src/librustc_trans/context.rs
index cb71ef104d3..5e12be5a22c 100644
--- a/src/librustc_trans/context.rs
+++ b/src/librustc_trans/context.rs
@@ -101,7 +101,6 @@ pub struct LocalCrateContext<'a, 'tcx: 'a> {
 
     lltypes: RefCell<FxHashMap<Ty<'tcx>, Type>>,
     isize_ty: Type,
-    opaque_vec_type: Type,
     str_slice_type: Type,
 
     dbg_cx: Option<debuginfo::CrateDebugContext<'tcx>>,
@@ -378,7 +377,6 @@ impl<'a, 'tcx> LocalCrateContext<'a, 'tcx> {
                 used_statics: RefCell::new(Vec::new()),
                 lltypes: RefCell::new(FxHashMap()),
                 isize_ty: Type::from_ref(ptr::null_mut()),
-                opaque_vec_type: Type::from_ref(ptr::null_mut()),
                 str_slice_type: Type::from_ref(ptr::null_mut()),
                 dbg_cx,
                 eh_personality: Cell::new(None),
@@ -389,24 +387,23 @@ impl<'a, 'tcx> LocalCrateContext<'a, 'tcx> {
                 placeholder: PhantomData,
             };
 
-            let (isize_ty, opaque_vec_type, str_slice_ty, mut local_ccx) = {
+            let (isize_ty, str_slice_ty, mut local_ccx) = {
                 // Do a little dance to create a dummy CrateContext, so we can
                 // create some things in the LLVM module of this codegen unit
                 let mut local_ccxs = vec![local_ccx];
-                let (isize_ty, opaque_vec_type, str_slice_ty) = {
+                let (isize_ty, str_slice_ty) = {
                     let dummy_ccx = LocalCrateContext::dummy_ccx(shared,
                                                                  local_ccxs.as_mut_slice());
                     let mut str_slice_ty = Type::named_struct(&dummy_ccx, "str_slice");
                     str_slice_ty.set_struct_body(&[Type::i8p(&dummy_ccx),
                                                    Type::isize(&dummy_ccx)],
                                                  false);
-                    (Type::isize(&dummy_ccx), Type::opaque_vec(&dummy_ccx), str_slice_ty)
+                    (Type::isize(&dummy_ccx), str_slice_ty)
                 };
-                (isize_ty, opaque_vec_type, str_slice_ty, local_ccxs.pop().unwrap())
+                (isize_ty, str_slice_ty, local_ccxs.pop().unwrap())
             };
 
             local_ccx.isize_ty = isize_ty;
-            local_ccx.opaque_vec_type = opaque_vec_type;
             local_ccx.str_slice_type = str_slice_ty;
 
             local_ccx
diff --git a/src/librustc_trans/type_.rs b/src/librustc_trans/type_.rs
index ffb303688aa..098c5b2d957 100644
--- a/src/librustc_trans/type_.rs
+++ b/src/librustc_trans/type_.rs
@@ -214,16 +214,6 @@ impl Type {
         ty!(llvm::LLVMVectorType(ty.to_ref(), len as c_uint))
     }
 
-    pub fn vec(ccx: &CrateContext, ty: &Type) -> Type {
-        Type::struct_(ccx,
-            &[Type::array(ty, 0), Type::isize(ccx)],
-        false)
-    }
-
-    pub fn opaque_vec(ccx: &CrateContext) -> Type {
-        Type::vec(ccx, &Type::i8(ccx))
-    }
-
     pub fn vtable_ptr(ccx: &CrateContext) -> Type {
         Type::func(&[Type::i8p(ccx)], &Type::void(ccx)).ptr_to().ptr_to()
     }