1
1
#![ allow( non_camel_case_types) ]
2
2
3
3
use libc:: { c_char, c_uint, size_t} ;
4
- use rustc_ast:: expand:: autodiff_attrs:: DiffActivity ;
5
- use tracing:: trace;
6
-
7
4
use super :: ffi:: * ;
8
5
9
6
extern "C" {
10
7
// Enzyme
11
8
pub fn LLVMRustAddFncParamAttr < ' a > ( F : & ' a Value , index : c_uint , Attr : & ' a Attribute ) ;
12
-
13
9
pub fn LLVMRustAddRetFncAttr ( F : & Value , attr : & Attribute ) ;
14
10
pub fn LLVMRustHasMetadata ( I : & Value , KindID : c_uint ) -> bool ;
15
11
pub fn LLVMRustEraseInstBefore ( BB : & BasicBlock , I : & Value ) ;
16
12
pub fn LLVMRustGetLastInstruction < ' a > ( BB : & BasicBlock ) -> Option < & ' a Value > ;
17
13
pub fn LLVMRustDIGetInstMetadata ( I : & Value ) -> & Metadata ;
18
14
pub fn LLVMRustEraseInstFromParent ( V : & Value ) ;
19
15
pub fn LLVMRustGetTerminator < ' a > ( B : & BasicBlock ) -> & ' a Value ;
16
+ pub fn LLVMRustAddEnumAttributeAtIndex (
17
+ C : & Context ,
18
+ V : & Value ,
19
+ index : c_uint ,
20
+ attr : AttributeKind ,
21
+ ) ;
22
+ pub fn LLVMRustRemoveEnumAttributeAtIndex ( V : & Value , index : c_uint , attr : AttributeKind ) ;
23
+ pub fn LLVMRustGetEnumAttributeAtIndex (
24
+ V : & Value ,
25
+ index : c_uint ,
26
+ attr : AttributeKind ,
27
+ ) -> & Attribute ;
28
+ pub fn LLVMRustAddParamAttr < ' a > ( Instr : & ' a Value , index : c_uint , Attr : & ' a Attribute ) ;
29
+
30
+
20
31
pub fn LLVMGetReturnType ( T : & Type ) -> & Type ;
21
- pub fn LLVMRustIsStructType ( T : & Type ) -> bool ;
22
32
pub fn LLVMDumpModule ( M : & Module ) ;
23
33
pub fn LLVMCountStructElementTypes ( T : & Type ) -> c_uint ;
24
34
pub fn LLVMVerifyFunction ( V : & Value , action : LLVMVerifierFailureAction ) -> bool ;
@@ -34,7 +44,6 @@ extern "C" {
34
44
pub fn LLVMGetFirstFunction ( M : & Module ) -> Option < & Value > ;
35
45
pub fn LLVMGetNextFunction ( V : & Value ) -> Option < & Value > ;
36
46
pub fn LLVMGetNamedFunction ( M : & Module , Name : * const c_char ) -> Option < & Value > ;
37
- //pub fn LLVMGlobalGetValueType(val: &Value) -> &Type;
38
47
pub fn LLVMRustGetFunctionType ( fnc : & Value ) -> & Type ;
39
48
40
49
pub fn LLVMRemoveStringAttributeAtIndex ( F : & Value , Idx : c_uint , K : * const c_char , KLen : c_uint ) ;
@@ -46,20 +55,6 @@ extern "C" {
46
55
) -> & Attribute ;
47
56
pub fn LLVMIsEnumAttribute ( A : & Attribute ) -> bool ;
48
57
pub fn LLVMIsStringAttribute ( A : & Attribute ) -> bool ;
49
- pub fn LLVMRustAddEnumAttributeAtIndex (
50
- C : & Context ,
51
- V : & Value ,
52
- index : c_uint ,
53
- attr : AttributeKind ,
54
- ) ;
55
- pub fn LLVMRustRemoveEnumAttributeAtIndex ( V : & Value , index : c_uint , attr : AttributeKind ) ;
56
- pub fn LLVMRustGetEnumAttributeAtIndex (
57
- V : & Value ,
58
- index : c_uint ,
59
- attr : AttributeKind ,
60
- ) -> & Attribute ;
61
-
62
- pub fn LLVMRustAddParamAttr < ' a > ( Instr : & ' a Value , index : c_uint , Attr : & ' a Attribute ) ;
63
58
64
59
}
65
60
0 commit comments