@@ -205,6 +205,8 @@ pub enum BasicBlock_opaque {}
205205pub type BasicBlockRef = * BasicBlock_opaque ;
206206pub enum Builder_opaque { }
207207pub type BuilderRef = * Builder_opaque ;
208+ pub enum ExecutionEngine_opaque { }
209+ pub type ExecutionEngineRef = * ExecutionEngine_opaque ;
208210pub enum MemoryBuffer_opaque { }
209211pub type MemoryBufferRef = * MemoryBuffer_opaque ;
210212pub enum PassManager_opaque { }
@@ -223,7 +225,7 @@ pub enum Pass_opaque {}
223225pub type PassRef = * Pass_opaque ;
224226
225227pub mod llvm {
226- use super :: { AtomicBinOp , AtomicOrdering , BasicBlockRef } ;
228+ use super :: { AtomicBinOp , AtomicOrdering , BasicBlockRef , ExecutionEngineRef } ;
227229 use super :: { Bool , BuilderRef , ContextRef , MemoryBufferRef , ModuleRef } ;
228230 use super :: { ObjectFileRef , Opcode , PassManagerRef , PassManagerBuilderRef } ;
229231 use super :: { SectionIteratorRef , TargetDataRef , TypeKind , TypeRef , UseRef } ;
@@ -239,23 +241,21 @@ pub mod llvm {
239241 #[ fast_ffi]
240242 pub unsafe fn LLVMContextCreate ( ) -> ContextRef ;
241243 #[ fast_ffi]
242- pub unsafe fn LLVMGetGlobalContext ( ) -> ContextRef ;
243- #[ fast_ffi]
244244 pub unsafe fn LLVMContextDispose ( C : ContextRef ) ;
245245 #[ fast_ffi]
246246 pub unsafe fn LLVMGetMDKindIDInContext ( C : ContextRef ,
247247 Name : * c_char ,
248248 SLen : c_uint )
249249 -> c_uint ;
250- #[ fast_ffi]
251- pub unsafe fn LLVMGetMDKindID ( Name : * c_char , SLen : c_uint ) -> c_uint ;
252250
253251 /* Create and destroy modules. */
254252 #[ fast_ffi]
255253 pub unsafe fn LLVMModuleCreateWithNameInContext ( ModuleID : * c_char ,
256254 C : ContextRef )
257255 -> ModuleRef ;
258256 #[ fast_ffi]
257+ pub unsafe fn LLVMGetModuleContext ( M : ModuleRef ) -> ContextRef ;
258+ #[ fast_ffi]
259259 pub unsafe fn LLVMDisposeModule ( M : ModuleRef ) ;
260260
261261 /** Data layout. See Module::getDataLayout. */
@@ -300,18 +300,6 @@ pub mod llvm {
300300 pub unsafe fn LLVMIntTypeInContext ( C : ContextRef ,
301301 NumBits : c_uint ) -> TypeRef ;
302302
303- #[ fast_ffi]
304- pub unsafe fn LLVMInt1Type ( ) -> TypeRef ;
305- #[ fast_ffi]
306- pub unsafe fn LLVMInt8Type ( ) -> TypeRef ;
307- #[ fast_ffi]
308- pub unsafe fn LLVMInt16Type ( ) -> TypeRef ;
309- #[ fast_ffi]
310- pub unsafe fn LLVMInt32Type ( ) -> TypeRef ;
311- #[ fast_ffi]
312- pub unsafe fn LLVMInt64Type ( ) -> TypeRef ;
313- #[ fast_ffi]
314- pub unsafe fn LLVMIntType ( NumBits : c_uint ) -> TypeRef ;
315303 #[ fast_ffi]
316304 pub unsafe fn LLVMGetIntTypeWidth ( IntegerTy : TypeRef ) -> c_uint ;
317305
@@ -327,17 +315,6 @@ pub mod llvm {
327315 #[ fast_ffi]
328316 pub unsafe fn LLVMPPCFP128TypeInContext ( C : ContextRef ) -> TypeRef ;
329317
330- #[ fast_ffi]
331- pub unsafe fn LLVMFloatType ( ) -> TypeRef ;
332- #[ fast_ffi]
333- pub unsafe fn LLVMDoubleType ( ) -> TypeRef ;
334- #[ fast_ffi]
335- pub unsafe fn LLVMX86FP80Type ( ) -> TypeRef ;
336- #[ fast_ffi]
337- pub unsafe fn LLVMFP128Type ( ) -> TypeRef ;
338- #[ fast_ffi]
339- pub unsafe fn LLVMPPCFP128Type ( ) -> TypeRef ;
340-
341318 /* Operations on function types */
342319 #[ fast_ffi]
343320 pub unsafe fn LLVMFunctionType ( ReturnType : TypeRef ,
@@ -361,11 +338,6 @@ pub mod llvm {
361338 ElementCount : c_uint ,
362339 Packed : Bool ) -> TypeRef ;
363340 #[ fast_ffi]
364- pub unsafe fn LLVMStructType ( ElementTypes : * TypeRef ,
365- ElementCount : c_uint ,
366- Packed : Bool )
367- -> TypeRef ;
368- #[ fast_ffi]
369341 pub unsafe fn LLVMCountStructElementTypes ( StructTy : TypeRef )
370342 -> c_uint ;
371343 #[ fast_ffi]
@@ -393,6 +365,10 @@ pub mod llvm {
393365 pub unsafe fn LLVMGetPointerAddressSpace ( PointerTy : TypeRef )
394366 -> c_uint ;
395367 #[ fast_ffi]
368+ pub unsafe fn LLVMGetPointerToGlobal ( EE : ExecutionEngineRef ,
369+ V : ValueRef )
370+ -> * ( ) ;
371+ #[ fast_ffi]
396372 pub unsafe fn LLVMGetVectorSize ( VectorTy : TypeRef ) -> c_uint ;
397373
398374 /* Operations on other types */
@@ -403,13 +379,6 @@ pub mod llvm {
403379 #[ fast_ffi]
404380 pub unsafe fn LLVMMetadataTypeInContext ( C : ContextRef ) -> TypeRef ;
405381
406- #[ fast_ffi]
407- pub unsafe fn LLVMVoidType ( ) -> TypeRef ;
408- #[ fast_ffi]
409- pub unsafe fn LLVMLabelType ( ) -> TypeRef ;
410- #[ fast_ffi]
411- pub unsafe fn LLVMMetadataType ( ) -> TypeRef ;
412-
413382 /* Operations on all values */
414383 #[ fast_ffi]
415384 pub unsafe fn LLVMTypeOf ( Val : ValueRef ) -> TypeRef ;
@@ -482,15 +451,11 @@ pub mod llvm {
482451 SLen : c_uint )
483452 -> ValueRef ;
484453 #[ fast_ffi]
485- pub unsafe fn LLVMMDString ( Str : * c_char , SLen : c_uint ) -> ValueRef ;
486- #[ fast_ffi]
487454 pub unsafe fn LLVMMDNodeInContext ( C : ContextRef ,
488455 Vals : * ValueRef ,
489456 Count : c_uint )
490457 -> ValueRef ;
491458 #[ fast_ffi]
492- pub unsafe fn LLVMMDNode ( Vals : * ValueRef , Count : c_uint ) -> ValueRef ;
493- #[ fast_ffi]
494459 pub unsafe fn LLVMAddNamedMetadataOperand ( M : ModuleRef , Str : * c_char ,
495460 Val : ValueRef ) ;
496461
@@ -544,20 +509,11 @@ pub mod llvm {
544509 Packed : Bool ) -> ValueRef ;
545510
546511 #[ fast_ffi]
547- pub unsafe fn LLVMConstString ( Str : * c_char ,
548- Length : c_uint ,
549- DontNullTerminate : Bool )
550- -> ValueRef ;
551- #[ fast_ffi]
552512 pub unsafe fn LLVMConstArray ( ElementTy : TypeRef ,
553513 ConstantVals : * ValueRef ,
554514 Length : c_uint )
555515 -> ValueRef ;
556516 #[ fast_ffi]
557- pub unsafe fn LLVMConstStruct ( ConstantVals : * ValueRef ,
558- Count : c_uint ,
559- Packed : Bool ) -> ValueRef ;
560- #[ fast_ffi]
561517 pub unsafe fn LLVMConstVector ( ScalarConstantVals : * ValueRef ,
562518 Size : c_uint ) -> ValueRef ;
563519
@@ -970,15 +926,6 @@ pub mod llvm {
970926 BB : BasicBlockRef ,
971927 Name : * c_char )
972928 -> BasicBlockRef ;
973-
974- #[ fast_ffi]
975- pub unsafe fn LLVMAppendBasicBlock ( Fn : ValueRef ,
976- Name : * c_char )
977- -> BasicBlockRef ;
978- #[ fast_ffi]
979- pub unsafe fn LLVMInsertBasicBlock ( InsertBeforeBB : BasicBlockRef ,
980- Name : * c_char )
981- -> BasicBlockRef ;
982929 #[ fast_ffi]
983930 pub unsafe fn LLVMDeleteBasicBlock ( BB : BasicBlockRef ) ;
984931
@@ -1039,8 +986,6 @@ pub mod llvm {
1039986 #[ fast_ffi]
1040987 pub unsafe fn LLVMCreateBuilderInContext ( C : ContextRef ) -> BuilderRef ;
1041988 #[ fast_ffi]
1042- pub unsafe fn LLVMCreateBuilder ( ) -> BuilderRef ;
1043- #[ fast_ffi]
1044989 pub unsafe fn LLVMPositionBuilder ( Builder : BuilderRef ,
1045990 Block : BasicBlockRef ,
1046991 Instr : ValueRef ) ;
@@ -1064,6 +1009,8 @@ pub mod llvm {
10641009 Name : * c_char ) ;
10651010 #[ fast_ffi]
10661011 pub unsafe fn LLVMDisposeBuilder ( Builder : BuilderRef ) ;
1012+ #[ fast_ffi]
1013+ pub unsafe fn LLVMDisposeExecutionEngine ( EE : ExecutionEngineRef ) ;
10671014
10681015 /* Metadata */
10691016 #[ fast_ffi]
@@ -1880,11 +1827,11 @@ pub mod llvm {
18801827
18811828 /** Execute the JIT engine. */
18821829 #[ fast_ffi]
1883- pub unsafe fn LLVMRustExecuteJIT ( MM : * ( ) ,
1830+ pub unsafe fn LLVMRustBuildJIT ( MM : * ( ) ,
18841831 PM : PassManagerRef ,
18851832 M : ModuleRef ,
18861833 OptLevel : c_int ,
1887- EnableSegmentedStacks : bool ) -> * ( ) ;
1834+ EnableSegmentedStacks : bool ) -> ExecutionEngineRef ;
18881835
18891836 /** Parses the bitcode in the given memory buffer. */
18901837 #[ fast_ffi]
@@ -1893,7 +1840,8 @@ pub mod llvm {
18931840
18941841 /** Parses LLVM asm in the given file */
18951842 #[ fast_ffi]
1896- pub unsafe fn LLVMRustParseAssemblyFile ( Filename : * c_char )
1843+ pub unsafe fn LLVMRustParseAssemblyFile ( Filename : * c_char ,
1844+ C : ContextRef )
18971845 -> ModuleRef ;
18981846
18991847 #[ fast_ffi]
@@ -1909,6 +1857,9 @@ pub mod llvm {
19091857 #[ fast_ffi]
19101858 pub unsafe fn LLVMRustPrintPassTimings ( ) ;
19111859
1860+ #[ fast_ffi]
1861+ pub unsafe fn LLVMRustStartMultithreading ( ) -> bool ;
1862+
19121863 #[ fast_ffi]
19131864 pub unsafe fn LLVMStructCreateNamed ( C : ContextRef , Name : * c_char )
19141865 -> TypeRef ;
0 commit comments