File tree Expand file tree Collapse file tree 3 files changed +2
-37
lines changed
src/librustc_codegen_llvm/llvm Expand file tree Collapse file tree 3 files changed +2
-37
lines changed Original file line number Diff line number Diff line change @@ -25,8 +25,8 @@ pub struct ArchiveRO {
25
25
unsafe impl Send for ArchiveRO { }
26
26
27
27
pub struct Iter < ' a > {
28
- archive : & ' a ArchiveRO ,
29
28
ptr : super :: ArchiveIteratorRef ,
29
+ _data : marker:: PhantomData < & ' a ArchiveRO > ,
30
30
}
31
31
32
32
pub struct Child < ' a > {
@@ -73,7 +73,7 @@ impl ArchiveRO {
73
73
unsafe {
74
74
Iter {
75
75
ptr : super :: LLVMRustArchiveIteratorNew ( self . ptr ) ,
76
- archive : self ,
76
+ _data : marker :: PhantomData ,
77
77
}
78
78
}
79
79
}
Original file line number Diff line number Diff line change @@ -392,8 +392,6 @@ extern { pub type PassManagerBuilder_opaque; }
392
392
pub type PassManagerBuilderRef = * mut PassManagerBuilder_opaque ;
393
393
extern { pub type Use_opaque ; }
394
394
pub type UseRef = * mut Use_opaque ;
395
- extern { pub type TargetData_opaque ; }
396
- pub type TargetDataRef = * mut TargetData_opaque ;
397
395
extern { pub type ObjectFile_opaque ; }
398
396
pub type ObjectFileRef = * mut ObjectFile_opaque ;
399
397
extern { pub type SectionIterator_opaque ; }
@@ -1264,12 +1262,6 @@ extern "C" {
1264
1262
/// Writes a module to the specified path. Returns 0 on success.
1265
1263
pub fn LLVMWriteBitcodeToFile ( M : & Module , Path : * const c_char ) -> c_int ;
1266
1264
1267
- /// Creates target data from a target layout string.
1268
- pub fn LLVMCreateTargetData ( StringRep : * const c_char ) -> TargetDataRef ;
1269
-
1270
- /// Disposes target data.
1271
- pub fn LLVMDisposeTargetData ( TD : TargetDataRef ) ;
1272
-
1273
1265
/// Creates a pass manager.
1274
1266
pub fn LLVMCreatePassManager ( ) -> PassManagerRef ;
1275
1267
Original file line number Diff line number Diff line change 11
11
#![ allow( non_upper_case_globals) ]
12
12
#![ allow( non_camel_case_types) ]
13
13
#![ allow( non_snake_case) ]
14
- #![ allow( dead_code) ]
15
14
#![ deny( bare_trait_objects) ]
16
15
17
16
pub use self :: IntPredicate :: * ;
@@ -177,25 +176,6 @@ impl Attribute {
177
176
}
178
177
}
179
178
180
- // Memory-managed interface to target data.
181
-
182
- struct TargetData {
183
- lltd : TargetDataRef ,
184
- }
185
-
186
- impl Drop for TargetData {
187
- fn drop ( & mut self ) {
188
- unsafe {
189
- LLVMDisposeTargetData ( self . lltd ) ;
190
- }
191
- }
192
- }
193
-
194
- fn mk_target_data ( string_rep : & str ) -> TargetData {
195
- let string_rep = CString :: new ( string_rep) . unwrap ( ) ;
196
- TargetData { lltd : unsafe { LLVMCreateTargetData ( string_rep. as_ptr ( ) ) } }
197
- }
198
-
199
179
// Memory-managed interface to object files.
200
180
201
181
pub struct ObjectFile {
@@ -254,13 +234,6 @@ pub fn get_param(llfn: ValueRef, index: c_uint) -> ValueRef {
254
234
}
255
235
}
256
236
257
- fn get_params ( llfn : ValueRef ) -> Vec < ValueRef > {
258
- unsafe {
259
- let num_params = LLVMCountParams ( llfn) ;
260
- ( 0 ..num_params) . map ( |idx| LLVMGetParam ( llfn, idx) ) . collect ( )
261
- }
262
- }
263
-
264
237
pub fn build_string < F > ( f : F ) -> Option < String >
265
238
where F : FnOnce ( RustStringRef )
266
239
{
You can’t perform that action at this time.
0 commit comments