@@ -22,8 +22,8 @@ import llvm.CallConv;
22
22
import llvm. IntPredicate ;
23
23
import llvm. RealPredicate ;
24
24
import llvm. Opcode ;
25
- import llvmext . ObjectFileRef ;
26
- import llvmext . SectionIteratorRef ;
25
+ import llvm . ObjectFileRef ;
26
+ import llvm . SectionIteratorRef ;
27
27
28
28
type ULongLong = u64 ;
29
29
type LongLong = i64 ;
@@ -740,9 +740,10 @@ native mod llvm = llvm_lib {
740
740
741
741
/** Destroys a memory buffer. */
742
742
fn LLVMDisposeMemoryBuffer ( MemoryBufferRef MemBuf ) ;
743
- }
744
743
745
- native mod llvmext = llvm_lib {
744
+
745
+ /* Stuff that's in rustllvm/ because it's not upstream yet. */
746
+
746
747
type ObjectFileRef ;
747
748
type SectionIteratorRef ;
748
749
@@ -777,6 +778,11 @@ native mod llvmext = llvm_lib {
777
778
/** Returns a string describing the last error caused by an LLVMRust*
778
779
call. */
779
780
fn LLVMRustGetLastError ( ) -> sbuf ;
781
+
782
+
783
+ }
784
+
785
+ native mod rustllvm = llvm_lib {
780
786
}
781
787
782
788
/* Slightly more terse object-interface to LLVM's 'builder' functions. */
@@ -1384,26 +1390,26 @@ fn mk_pass_manager() -> pass_manager {
1384
1390
/* Memory-managed interface to object files. */
1385
1391
1386
1392
obj object_file_dtor ( ObjectFileRef ObjectFile ) {
1387
- drop { llvmext . LLVMDisposeObjectFile ( ObjectFile ) ; }
1393
+ drop { llvm . LLVMDisposeObjectFile ( ObjectFile ) ; }
1388
1394
}
1389
1395
1390
1396
type object_file = rec ( ObjectFileRef llof, object_file_dtor dtor) ;
1391
1397
1392
1398
fn mk_object_file ( MemoryBufferRef llmb) -> object_file {
1393
- auto llof = llvmext . LLVMCreateObjectFile ( llmb) ;
1399
+ auto llof = llvm . LLVMCreateObjectFile ( llmb) ;
1394
1400
ret rec ( llof=llof, dtor=object_file_dtor ( llof) ) ;
1395
1401
}
1396
1402
1397
1403
/* Memory-managed interface to section iterators. */
1398
1404
1399
1405
obj section_iter_dtor ( SectionIteratorRef SI ) {
1400
- drop { llvmext . LLVMDisposeSectionIterator ( SI ) ; }
1406
+ drop { llvm . LLVMDisposeSectionIterator ( SI ) ; }
1401
1407
}
1402
1408
1403
1409
type section_iter = rec ( SectionIteratorRef llsi, section_iter_dtor dtor) ;
1404
1410
1405
1411
fn mk_section_iter ( ObjectFileRef llof) -> section_iter {
1406
- auto llsi = llvmext . LLVMGetSections ( llof) ;
1412
+ auto llsi = llvm . LLVMGetSections ( llof) ;
1407
1413
ret rec ( llsi=llsi, dtor=section_iter_dtor ( llsi) ) ;
1408
1414
}
1409
1415
0 commit comments