22
33use libc:: { c_char, c_uint} ;
44
5- use super :: Bool ;
6- use super :: ffi:: { Attribute , BasicBlock , Metadata , Module , Type , Value } ;
5+ use super :: ffi:: { BasicBlock , Metadata , Module , Type , Value } ;
76extern "C" {
87 // Enzyme
98 pub fn LLVMRustHasMetadata ( I : & Value , KindID : c_uint ) -> bool ;
@@ -12,21 +11,18 @@ extern "C" {
1211 pub fn LLVMRustDIGetInstMetadata ( I : & Value ) -> Option < & Metadata > ;
1312 pub fn LLVMRustEraseInstFromParent ( V : & Value ) ;
1413 pub fn LLVMRustGetTerminator < ' a > ( B : & BasicBlock ) -> & ' a Value ;
14+ pub fn LLVMRustVerifyFunction ( V : & Value , action : LLVMRustVerifierFailureAction ) -> bool ;
1515
1616 pub fn LLVMGetFunctionCallConv ( F : & Value ) -> c_uint ;
1717 pub fn LLVMGetReturnType ( T : & Type ) -> & Type ;
18- pub fn LLVMDumpModule ( M : & Module ) ;
19- pub fn LLVMCountStructElementTypes ( T : & Type ) -> c_uint ;
20- pub fn LLVMVerifyFunction ( V : & Value , action : LLVMVerifierFailureAction ) -> Bool ;
2118 pub fn LLVMGetParams ( Fnc : & Value , parms : * mut & Value ) ;
2219 pub fn LLVMGetNamedFunction ( M : & Module , Name : * const c_char ) -> Option < & Value > ;
23- pub fn LLVMIsEnumAttribute ( A : & Attribute ) -> Bool ;
24- pub fn LLVMIsStringAttribute ( A : & Attribute ) -> Bool ;
2520}
2621
2722#[ repr( C ) ]
28- pub enum LLVMVerifierFailureAction {
29- LLVMAbortProcessAction ,
30- LLVMPrintMessageAction ,
31- LLVMReturnStatusAction ,
23+ #[ derive( Copy , Clone , PartialEq ) ]
24+ pub enum LLVMRustVerifierFailureAction {
25+ LLVMAbortProcessAction = 0 ,
26+ LLVMPrintMessageAction = 1 ,
27+ LLVMReturnStatusAction = 2 ,
3228}
0 commit comments