@@ -20,7 +20,6 @@ use syntax::abi::{X86, X86_64, Arm, Mips};
20
20
21
21
use std:: c_str:: ToCStr ;
22
22
use std:: cast;
23
- use std:: slice;
24
23
25
24
use std:: libc:: { c_uint} ;
26
25
@@ -135,10 +134,6 @@ impl Type {
135
134
}
136
135
}
137
136
138
- pub fn size_t ( ccx : & CrateContext ) -> Type {
139
- Type :: int ( ccx)
140
- }
141
-
142
137
pub fn func ( args : & [ Type ] , ret : & Type ) -> Type {
143
138
let vec : & [ TypeRef ] = unsafe { cast:: transmute ( args) } ;
144
139
ty ! ( llvm:: LLVMFunctionType ( ret. to_ref( ) , vec. as_ptr( ) ,
@@ -151,10 +146,6 @@ impl Type {
151
146
args. len( ) as c_uint, True ) )
152
147
}
153
148
154
- pub fn ptr ( ty : Type ) -> Type {
155
- ty ! ( llvm:: LLVMPointerType ( ty. to_ref( ) , 0 as c_uint) )
156
- }
157
-
158
149
pub fn struct_ ( ccx : & CrateContext , els : & [ Type ] , packed : bool ) -> Type {
159
150
let els : & [ TypeRef ] = unsafe { cast:: transmute ( els) } ;
160
151
ty ! ( llvm:: LLVMStructTypeInContext ( ccx. llcx, els. as_ptr( ) ,
@@ -259,17 +250,6 @@ impl Type {
259
250
ty ! ( llvm:: LLVMPointerType ( self . to_ref( ) , 0 ) )
260
251
}
261
252
262
- pub fn get_field ( & self , idx : uint ) -> Type {
263
- unsafe {
264
- let num_fields = llvm:: LLVMCountStructElementTypes ( self . to_ref ( ) ) as uint ;
265
- let mut elems = slice:: from_elem ( num_fields, 0 as TypeRef ) ;
266
-
267
- llvm:: LLVMGetStructElementTypes ( self . to_ref ( ) , elems. as_mut_ptr ( ) ) ;
268
-
269
- Type :: from_ref ( elems[ idx] )
270
- }
271
- }
272
-
273
253
pub fn is_packed ( & self ) -> bool {
274
254
unsafe {
275
255
llvm:: LLVMIsPackedStruct ( self . to_ref ( ) ) == True
0 commit comments