1 /* 2 * Copyright (c) 2024-2025 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 #ifndef CAPI_EXPORT 30 #ifdef PANDA_TARGET_WINDOWS 31 #define CAPI_EXPORT __declspec(dllexport) 32 #else 33 #define CAPI_EXPORT __attribute__((visibility("default"))) 34 #endif 35 #endif 36 37 struct AbckitFile; 38 struct AbckitString; 39 struct AbckitType; 40 struct AbckitValue; 41 struct AbckitLiteral; 42 struct AbckitLiteralArray; 43 44 struct AbckitCoreModule; 45 struct AbckitCoreNamespace; 46 struct AbckitCoreClass; 47 struct AbckitCoreFunction; 48 struct AbckitCoreField; 49 struct AbckitCoreAnnotation; 50 struct AbckitCoreAnnotationElement; 51 struct AbckitCoreAnnotationInterface; 52 struct AbckitCoreAnnotationInterfaceField; 53 struct AbckitCoreImportDescriptor; 54 struct AbckitCoreExportDescriptor; 55 56 struct AbckitArktsModule; 57 struct AbckitArktsNamespace; 58 struct AbckitArktsClass; 59 struct AbckitArktsFunction; 60 struct AbckitArktsField; 61 struct AbckitArktsAnnotation; 62 struct AbckitArktsAnnotationElement; 63 struct AbckitArktsAnnotationInterface; 64 struct AbckitArktsAnnotationInterfaceField; 65 struct AbckitArktsImportDescriptor; 66 struct AbckitArktsExportDescriptor; 67 68 struct AbckitJsModule; 69 struct AbckitJsClass; 70 struct AbckitJsFunction; 71 struct AbckitJsImportDescriptor; 72 struct AbckitJsExportDescriptor; 73 74 struct AbckitGraph; 75 struct AbckitBasicBlock; 76 struct AbckitInst; 77 78 #ifndef __cplusplus 79 typedef uint8_t *AbckitFileVersion; 80 81 typedef struct AbckitFile AbckitFile; 82 typedef struct AbckitString AbckitString; 83 typedef struct AbckitType AbckitType; 84 typedef struct AbckitValue AbckitValue; 85 typedef struct AbckitLiteral AbckitLiteral; 86 typedef struct AbckitLiteralArray AbckitLiteralArray; 87 88 typedef struct AbckitCoreModule AbckitCoreModule; 89 typedef struct AbckitCoreNamespace AbckitCoreNamespace; 90 typedef struct AbckitCoreClass AbckitCoreClass; 91 typedef struct AbckitCoreFunction AbckitCoreFunction; 92 typedef struct AbckitCoreField AbckitCoreField; 93 typedef struct AbckitCoreAnnotation AbckitCoreAnnotation; 94 typedef struct AbckitCoreAnnotationElement AbckitCoreAnnotationElement; 95 typedef struct AbckitCoreAnnotationInterface AbckitCoreAnnotationInterface; 96 typedef struct AbckitCoreAnnotationInterfaceField AbckitCoreAnnotationInterfaceField; 97 typedef struct AbckitCoreImportDescriptor AbckitCoreImportDescriptor; 98 typedef struct AbckitCoreExportDescriptor AbckitCoreExportDescriptor; 99 100 typedef struct AbckitArktsModule AbckitArktsModule; 101 typedef struct AbckitArktsNamespace AbckitArktsNamespace; 102 typedef struct AbckitArktsClass AbckitArktsClass; 103 typedef struct AbckitArktsFunction AbckitArktsFunction; 104 typedef struct AbckitArktsField AbckitArktsField; 105 typedef struct AbckitArktsAnnotation AbckitArktsAnnotation; 106 typedef struct AbckitArktsAnnotationElement AbckitArktsAnnotationElement; 107 typedef struct AbckitArktsAnnotationInterface AbckitArktsAnnotationInterface; 108 typedef struct AbckitArktsAnnotationInterfaceField AbckitArktsAnnotationInterfaceField; 109 typedef struct AbckitArktsImportDescriptor AbckitArktsImportDescriptor; 110 typedef struct AbckitArktsExportDescriptor AbckitArktsExportDescriptor; 111 112 typedef struct AbckitJsModule AbckitJsModule; 113 typedef struct AbckitJsClass AbckitJsClass; 114 typedef struct AbckitJsFunction AbckitJsFunction; 115 typedef struct AbckitJsImportDescriptor AbckitJsImportDescriptor; 116 typedef struct AbckitJsExportDescriptor AbckitJsExportDescriptor; 117 118 typedef struct AbckitGraph AbckitGraph; 119 typedef struct AbckitBasicBlock AbckitBasicBlock; 120 typedef struct AbckitInst AbckitInst; 121 #else 122 using AbckitFileVersion = uint8_t *; 123 #endif 124 125 #ifdef __cplusplus 126 } 127 #endif 128 129 #endif 130