@@ -390,13 +390,11 @@ extern { pub type Metadata; }
390
390
extern { pub type BasicBlock ; }
391
391
extern { pub type Builder ; }
392
392
extern { pub type MemoryBuffer ; }
393
- pub type MemoryBufferRef = * mut MemoryBuffer ;
394
393
extern { pub type PassManager ; }
395
394
pub type PassManagerRef = * mut PassManager ;
396
395
extern { pub type PassManagerBuilder ; }
397
396
pub type PassManagerBuilderRef = * mut PassManagerBuilder ;
398
397
extern { pub type ObjectFile ; }
399
- pub type ObjectFileRef = * mut ObjectFile ;
400
398
extern { pub type SectionIterator ; }
401
399
pub type SectionIteratorRef = * mut SectionIterator ;
402
400
extern { pub type Pass ; }
@@ -1143,17 +1141,19 @@ extern "C" {
1143
1141
// Stuff that's in rustllvm/ because it's not upstream yet.
1144
1142
1145
1143
/// Opens an object file.
1146
- pub fn LLVMCreateObjectFile ( MemBuf : MemoryBufferRef ) -> ObjectFileRef ;
1144
+ pub fn LLVMCreateObjectFile (
1145
+ MemBuf : & ' static mut MemoryBuffer ,
1146
+ ) -> Option < & ' static mut ObjectFile > ;
1147
1147
/// Closes an object file.
1148
- pub fn LLVMDisposeObjectFile ( ObjFile : ObjectFileRef ) ;
1148
+ pub fn LLVMDisposeObjectFile ( ObjFile : & ' static mut ObjectFile ) ;
1149
1149
1150
1150
/// Enumerates the sections in an object file.
1151
- pub fn LLVMGetSections ( ObjFile : ObjectFileRef ) -> SectionIteratorRef ;
1151
+ pub fn LLVMGetSections ( ObjFile : & ObjectFile ) -> SectionIteratorRef ;
1152
1152
/// Destroys a section iterator.
1153
1153
pub fn LLVMDisposeSectionIterator ( SI : SectionIteratorRef ) ;
1154
1154
/// Returns true if the section iterator is at the end of the section
1155
1155
/// list:
1156
- pub fn LLVMIsSectionIteratorAtEnd ( ObjFile : ObjectFileRef , SI : SectionIteratorRef ) -> Bool ;
1156
+ pub fn LLVMIsSectionIteratorAtEnd ( ObjFile : & ObjectFile , SI : SectionIteratorRef ) -> Bool ;
1157
1157
/// Moves the section iterator to point to the next section.
1158
1158
pub fn LLVMMoveToNextSection ( SI : SectionIteratorRef ) ;
1159
1159
/// Returns the current section size.
@@ -1163,7 +1163,9 @@ extern "C" {
1163
1163
1164
1164
/// Reads the given file and returns it as a memory buffer. Use
1165
1165
/// LLVMDisposeMemoryBuffer() to get rid of it.
1166
- pub fn LLVMRustCreateMemoryBufferWithContentsOfFile ( Path : * const c_char ) -> MemoryBufferRef ;
1166
+ pub fn LLVMRustCreateMemoryBufferWithContentsOfFile (
1167
+ Path : * const c_char ,
1168
+ ) -> Option < & ' static mut MemoryBuffer > ;
1167
1169
1168
1170
pub fn LLVMStartMultithreaded ( ) -> Bool ;
1169
1171
0 commit comments