From b4653941d6a960691249218205b58b5576ce21c7 Mon Sep 17 00:00:00 2001 From: Corey Richardson Date: Tue, 1 Apr 2014 10:37:12 -0400 Subject: [PATCH] middle: trans: type_: remove dead code --- src/librustc/middle/trans/type_.rs | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/src/librustc/middle/trans/type_.rs b/src/librustc/middle/trans/type_.rs index ca01c0532fc..55ffa951cf2 100644 --- a/src/librustc/middle/trans/type_.rs +++ b/src/librustc/middle/trans/type_.rs @@ -20,7 +20,6 @@ use syntax::abi::{X86, X86_64, Arm, Mips}; use std::c_str::ToCStr; use std::cast; -use std::slice; use std::libc::{c_uint}; @@ -135,10 +134,6 @@ impl Type { } } - pub fn size_t(ccx: &CrateContext) -> Type { - Type::int(ccx) - } - pub fn func(args: &[Type], ret: &Type) -> Type { let vec : &[TypeRef] = unsafe { cast::transmute(args) }; ty!(llvm::LLVMFunctionType(ret.to_ref(), vec.as_ptr(), @@ -151,10 +146,6 @@ impl Type { args.len() as c_uint, True)) } - pub fn ptr(ty: Type) -> Type { - ty!(llvm::LLVMPointerType(ty.to_ref(), 0 as c_uint)) - } - pub fn struct_(ccx: &CrateContext, els: &[Type], packed: bool) -> Type { let els : &[TypeRef] = unsafe { cast::transmute(els) }; ty!(llvm::LLVMStructTypeInContext(ccx.llcx, els.as_ptr(), @@ -259,17 +250,6 @@ impl Type { ty!(llvm::LLVMPointerType(self.to_ref(), 0)) } - pub fn get_field(&self, idx: uint) -> Type { - unsafe { - let num_fields = llvm::LLVMCountStructElementTypes(self.to_ref()) as uint; - let mut elems = slice::from_elem(num_fields, 0 as TypeRef); - - llvm::LLVMGetStructElementTypes(self.to_ref(), elems.as_mut_ptr()); - - Type::from_ref(elems[idx]) - } - } - pub fn is_packed(&self) -> bool { unsafe { llvm::LLVMIsPackedStruct(self.to_ref()) == True