1 /* 2 * Copyright (c) 2024 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef DECLARATIONS_H 17 #define DECLARATIONS_H 18 19 #ifndef __cplusplus 20 #include <stdint.h> 21 #else 22 #include <cstdint> 23 #endif 24 25 #ifdef __cplusplus 26 extern "C" { 27 #endif 28 29 struct AbckitFile; 30 struct AbckitString; 31 struct AbckitType; 32 struct AbckitValue; 33 struct AbckitLiteral; 34 struct AbckitLiteralArray; 35 36 struct AbckitCoreModule; 37 struct AbckitCoreNamespace; 38 struct AbckitCoreClass; 39 struct AbckitCoreFunction; 40 struct AbckitCoreAnnotation; 41 struct AbckitCoreAnnotationElement; 42 struct AbckitCoreAnnotationInterface; 43 struct AbckitCoreAnnotationInterfaceField; 44 struct AbckitCoreImportDescriptor; 45 struct AbckitCoreExportDescriptor; 46 47 struct AbckitArktsModule; 48 struct AbckitArktsNamespace; 49 struct AbckitArktsClass; 50 struct AbckitArktsFunction; 51 struct AbckitArktsAnnotation; 52 struct AbckitArktsAnnotationElement; 53 struct AbckitArktsAnnotationInterface; 54 struct AbckitArktsAnnotationInterfaceField; 55 struct AbckitArktsImportDescriptor; 56 struct AbckitArktsExportDescriptor; 57 58 struct AbckitJsModule; 59 struct AbckitJsClass; 60 struct AbckitJsFunction; 61 struct AbckitJsImportDescriptor; 62 struct AbckitJsExportDescriptor; 63 64 struct AbckitGraph; 65 struct AbckitBasicBlock; 66 struct AbckitInst; 67 68 #ifndef __cplusplus 69 typedef uint8_t *AbckitFileVersion; 70 71 typedef struct AbckitFile AbckitFile; 72 typedef struct AbckitString AbckitString; 73 typedef struct AbckitType AbckitType; 74 typedef struct AbckitValue AbckitValue; 75 typedef struct AbckitLiteral AbckitLiteral; 76 typedef struct AbckitLiteralArray AbckitLiteralArray; 77 78 typedef struct AbckitCoreModule AbckitCoreModule; 79 typedef struct AbckitCoreNamespace AbckitCoreNamespace; 80 typedef struct AbckitCoreClass AbckitCoreClass; 81 typedef struct AbckitCoreFunction AbckitCoreFunction; 82 typedef struct AbckitCoreField AbckitCoreField; 83 typedef struct AbckitCoreAnnotation AbckitCoreAnnotation; 84 typedef struct AbckitCoreAnnotationElement AbckitCoreAnnotationElement; 85 typedef struct AbckitCoreAnnotationInterface AbckitCoreAnnotationInterface; 86 typedef struct AbckitCoreAnnotationInterfaceField AbckitCoreAnnotationInterfaceField; 87 typedef struct AbckitCoreImportDescriptor AbckitCoreImportDescriptor; 88 typedef struct AbckitCoreExportDescriptor AbckitCoreExportDescriptor; 89 90 typedef struct AbckitArktsModule AbckitArktsModule; 91 typedef struct AbckitArktsNamespace AbckitArktsNamespace; 92 typedef struct AbckitArktsClass AbckitArktsClass; 93 typedef struct AbckitArktsFunction AbckitArktsFunction; 94 typedef struct AbckitArktsField AbckitArktsField; 95 typedef struct AbckitArktsAnnotation AbckitArktsAnnotation; 96 typedef struct AbckitArktsAnnotationElement AbckitArktsAnnotationElement; 97 typedef struct AbckitArktsAnnotationInterface AbckitArktsAnnotationInterface; 98 typedef struct AbckitArktsAnnotationInterfaceField AbckitArktsAnnotationInterfaceField; 99 typedef struct AbckitArktsImportDescriptor AbckitArktsImportDescriptor; 100 typedef struct AbckitArktsExportDescriptor AbckitArktsExportDescriptor; 101 102 typedef struct AbckitJsModule AbckitJsModule; 103 typedef struct AbckitJsClass AbckitJsClass; 104 typedef struct AbckitJsFunction AbckitJsFunction; 105 typedef struct AbckitJsImportDescriptor AbckitJsImportDescriptor; 106 typedef struct AbckitJsExportDescriptor AbckitJsExportDescriptor; 107 108 typedef struct AbckitGraph AbckitGraph; 109 typedef struct AbckitBasicBlock AbckitBasicBlock; 110 typedef struct AbckitInst AbckitInst; 111 #else 112 using AbckitFileVersion = uint8_t *; 113 #endif 114 115 #ifdef __cplusplus 116 } 117 #endif 118 119 #endif 120