@@ -400,8 +400,7 @@ extern { pub type MemoryBuffer; }
400
400
pub struct PassManager < ' a > ( InvariantOpaque < ' a > ) ;
401
401
extern { pub type PassManagerBuilder ; }
402
402
extern { pub type ObjectFile ; }
403
- extern { pub type SectionIterator ; }
404
- pub type SectionIteratorRef = * mut SectionIterator ;
403
+ pub struct SectionIterator < ' a > ( InvariantOpaque < ' a > ) ;
405
404
extern { pub type Pass ; }
406
405
extern { pub type TargetMachine ; }
407
406
extern { pub type Archive ; }
@@ -1146,18 +1145,18 @@ extern "C" {
1146
1145
pub fn LLVMDisposeObjectFile ( ObjFile : & ' static mut ObjectFile ) ;
1147
1146
1148
1147
/// Enumerates the sections in an object file.
1149
- pub fn LLVMGetSections ( ObjFile : & ObjectFile ) -> SectionIteratorRef ;
1148
+ pub fn LLVMGetSections ( ObjFile : & ' a ObjectFile ) -> & ' a mut SectionIterator < ' a > ;
1150
1149
/// Destroys a section iterator.
1151
- pub fn LLVMDisposeSectionIterator ( SI : SectionIteratorRef ) ;
1150
+ pub fn LLVMDisposeSectionIterator ( SI : & ' a mut SectionIterator < ' a > ) ;
1152
1151
/// Returns true if the section iterator is at the end of the section
1153
1152
/// list:
1154
- pub fn LLVMIsSectionIteratorAtEnd ( ObjFile : & ObjectFile , SI : SectionIteratorRef ) -> Bool ;
1153
+ pub fn LLVMIsSectionIteratorAtEnd ( ObjFile : & ' a ObjectFile , SI : & SectionIterator < ' a > ) -> Bool ;
1155
1154
/// Moves the section iterator to point to the next section.
1156
- pub fn LLVMMoveToNextSection ( SI : SectionIteratorRef ) ;
1155
+ pub fn LLVMMoveToNextSection ( SI : & SectionIterator ) ;
1157
1156
/// Returns the current section size.
1158
- pub fn LLVMGetSectionSize ( SI : SectionIteratorRef ) -> c_ulonglong ;
1157
+ pub fn LLVMGetSectionSize ( SI : & SectionIterator ) -> c_ulonglong ;
1159
1158
/// Returns the current section contents as a string buffer.
1160
- pub fn LLVMGetSectionContents ( SI : SectionIteratorRef ) -> * const c_char ;
1159
+ pub fn LLVMGetSectionContents ( SI : & SectionIterator ) -> * const c_char ;
1161
1160
1162
1161
/// Reads the given file and returns it as a memory buffer. Use
1163
1162
/// LLVMDisposeMemoryBuffer() to get rid of it.
@@ -1481,7 +1480,7 @@ extern "C" {
1481
1480
pub fn LLVMRustArchiveIteratorFree ( AIR : ArchiveIteratorRef ) ;
1482
1481
pub fn LLVMRustDestroyArchive ( AR : & ' static mut Archive ) ;
1483
1482
1484
- pub fn LLVMRustGetSectionName ( SI : SectionIteratorRef , data : & mut * const c_char ) -> size_t ;
1483
+ pub fn LLVMRustGetSectionName ( SI : & SectionIterator , data : & mut * const c_char ) -> size_t ;
1485
1484
1486
1485
pub fn LLVMRustWriteTwineToString ( T : & Twine , s : & RustString ) ;
1487
1486
0 commit comments