@@ -400,8 +400,7 @@ extern { pub type MemoryBuffer; }
400400pub struct PassManager < ' a > ( InvariantOpaque < ' a > ) ;
401401extern { pub type PassManagerBuilder ; }
402402extern { pub type ObjectFile ; }
403- extern { pub type SectionIterator ; }
404- pub type SectionIteratorRef = * mut SectionIterator ;
403+ pub struct SectionIterator < ' a > ( InvariantOpaque < ' a > ) ;
405404extern { pub type Pass ; }
406405extern { pub type TargetMachine ; }
407406extern { pub type Archive ; }
@@ -1146,18 +1145,18 @@ extern "C" {
11461145 pub fn LLVMDisposeObjectFile ( ObjFile : & ' static mut ObjectFile ) ;
11471146
11481147 /// 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 > ;
11501149 /// Destroys a section iterator.
1151- pub fn LLVMDisposeSectionIterator ( SI : SectionIteratorRef ) ;
1150+ pub fn LLVMDisposeSectionIterator ( SI : & ' a mut SectionIterator < ' a > ) ;
11521151 /// Returns true if the section iterator is at the end of the section
11531152 /// list:
1154- pub fn LLVMIsSectionIteratorAtEnd ( ObjFile : & ObjectFile , SI : SectionIteratorRef ) -> Bool ;
1153+ pub fn LLVMIsSectionIteratorAtEnd ( ObjFile : & ' a ObjectFile , SI : & SectionIterator < ' a > ) -> Bool ;
11551154 /// Moves the section iterator to point to the next section.
1156- pub fn LLVMMoveToNextSection ( SI : SectionIteratorRef ) ;
1155+ pub fn LLVMMoveToNextSection ( SI : & SectionIterator ) ;
11571156 /// Returns the current section size.
1158- pub fn LLVMGetSectionSize ( SI : SectionIteratorRef ) -> c_ulonglong ;
1157+ pub fn LLVMGetSectionSize ( SI : & SectionIterator ) -> c_ulonglong ;
11591158 /// 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 ;
11611160
11621161 /// Reads the given file and returns it as a memory buffer. Use
11631162 /// LLVMDisposeMemoryBuffer() to get rid of it.
@@ -1481,7 +1480,7 @@ extern "C" {
14811480 pub fn LLVMRustArchiveIteratorFree ( AIR : ArchiveIteratorRef ) ;
14821481 pub fn LLVMRustDestroyArchive ( AR : & ' static mut Archive ) ;
14831482
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 ;
14851484
14861485 pub fn LLVMRustWriteTwineToString ( T : & Twine , s : & RustString ) ;
14871486
0 commit comments