|
|
|||
File indexing completed on 2026-05-10 08:43:01
0001 /*===-- llvm-c/Support.h - C Interface Types declarations ---------*- C -*-===*\ 0002 |* *| 0003 |* Part of the LLVM Project, under the Apache License v2.0 with LLVM *| 0004 |* Exceptions. *| 0005 |* See https://llvm.org/LICENSE.txt for license information. *| 0006 |* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception *| 0007 |* *| 0008 |*===----------------------------------------------------------------------===*| 0009 |* *| 0010 |* This file defines types used by the C interface to LLVM. *| 0011 |* *| 0012 \*===----------------------------------------------------------------------===*/ 0013 0014 #ifndef LLVM_C_TYPES_H 0015 #define LLVM_C_TYPES_H 0016 0017 #include "llvm-c/DataTypes.h" 0018 #include "llvm-c/ExternC.h" 0019 0020 LLVM_C_EXTERN_C_BEGIN 0021 0022 /** 0023 * @defgroup LLVMCSupportTypes Types and Enumerations 0024 * 0025 * @{ 0026 */ 0027 0028 typedef int LLVMBool; 0029 0030 /* Opaque types. */ 0031 0032 /** 0033 * LLVM uses a polymorphic type hierarchy which C cannot represent, therefore 0034 * parameters must be passed as base types. Despite the declared types, most 0035 * of the functions provided operate only on branches of the type hierarchy. 0036 * The declared parameter names are descriptive and specify which type is 0037 * required. Additionally, each type hierarchy is documented along with the 0038 * functions that operate upon it. For more detail, refer to LLVM's C++ code. 0039 * If in doubt, refer to Core.cpp, which performs parameter downcasts in the 0040 * form unwrap<RequiredType>(Param). 0041 */ 0042 0043 /** 0044 * Used to pass regions of memory through LLVM interfaces. 0045 * 0046 * @see llvm::MemoryBuffer 0047 */ 0048 typedef struct LLVMOpaqueMemoryBuffer *LLVMMemoryBufferRef; 0049 0050 /** 0051 * The top-level container for all LLVM global data. See the LLVMContext class. 0052 */ 0053 typedef struct LLVMOpaqueContext *LLVMContextRef; 0054 0055 /** 0056 * The top-level container for all other LLVM Intermediate Representation (IR) 0057 * objects. 0058 * 0059 * @see llvm::Module 0060 */ 0061 typedef struct LLVMOpaqueModule *LLVMModuleRef; 0062 0063 /** 0064 * Each value in the LLVM IR has a type, an LLVMTypeRef. 0065 * 0066 * @see llvm::Type 0067 */ 0068 typedef struct LLVMOpaqueType *LLVMTypeRef; 0069 0070 /** 0071 * Represents an individual value in LLVM IR. 0072 * 0073 * This models llvm::Value. 0074 */ 0075 typedef struct LLVMOpaqueValue *LLVMValueRef; 0076 0077 /** 0078 * Represents a basic block of instructions in LLVM IR. 0079 * 0080 * This models llvm::BasicBlock. 0081 */ 0082 typedef struct LLVMOpaqueBasicBlock *LLVMBasicBlockRef; 0083 0084 /** 0085 * Represents an LLVM Metadata. 0086 * 0087 * This models llvm::Metadata. 0088 */ 0089 typedef struct LLVMOpaqueMetadata *LLVMMetadataRef; 0090 0091 /** 0092 * Represents an LLVM Named Metadata Node. 0093 * 0094 * This models llvm::NamedMDNode. 0095 */ 0096 typedef struct LLVMOpaqueNamedMDNode *LLVMNamedMDNodeRef; 0097 0098 /** 0099 * Represents an entry in a Global Object's metadata attachments. 0100 * 0101 * This models std::pair<unsigned, MDNode *> 0102 */ 0103 typedef struct LLVMOpaqueValueMetadataEntry LLVMValueMetadataEntry; 0104 0105 /** 0106 * Represents an LLVM basic block builder. 0107 * 0108 * This models llvm::IRBuilder. 0109 */ 0110 typedef struct LLVMOpaqueBuilder *LLVMBuilderRef; 0111 0112 /** 0113 * Represents an LLVM debug info builder. 0114 * 0115 * This models llvm::DIBuilder. 0116 */ 0117 typedef struct LLVMOpaqueDIBuilder *LLVMDIBuilderRef; 0118 0119 /** 0120 * Interface used to provide a module to JIT or interpreter. 0121 * This is now just a synonym for llvm::Module, but we have to keep using the 0122 * different type to keep binary compatibility. 0123 */ 0124 typedef struct LLVMOpaqueModuleProvider *LLVMModuleProviderRef; 0125 0126 /** @see llvm::PassManagerBase */ 0127 typedef struct LLVMOpaquePassManager *LLVMPassManagerRef; 0128 0129 /** 0130 * Used to get the users and usees of a Value. 0131 * 0132 * @see llvm::Use */ 0133 typedef struct LLVMOpaqueUse *LLVMUseRef; 0134 0135 /** 0136 * @see llvm::OperandBundleDef 0137 */ 0138 typedef struct LLVMOpaqueOperandBundle *LLVMOperandBundleRef; 0139 0140 /** 0141 * Used to represent an attributes. 0142 * 0143 * @see llvm::Attribute 0144 */ 0145 typedef struct LLVMOpaqueAttributeRef *LLVMAttributeRef; 0146 0147 /** 0148 * @see llvm::DiagnosticInfo 0149 */ 0150 typedef struct LLVMOpaqueDiagnosticInfo *LLVMDiagnosticInfoRef; 0151 0152 /** 0153 * @see llvm::Comdat 0154 */ 0155 typedef struct LLVMComdat *LLVMComdatRef; 0156 0157 /** 0158 * @see llvm::Module::ModuleFlagEntry 0159 */ 0160 typedef struct LLVMOpaqueModuleFlagEntry LLVMModuleFlagEntry; 0161 0162 /** 0163 * @see llvm::JITEventListener 0164 */ 0165 typedef struct LLVMOpaqueJITEventListener *LLVMJITEventListenerRef; 0166 0167 /** 0168 * @see llvm::object::Binary 0169 */ 0170 typedef struct LLVMOpaqueBinary *LLVMBinaryRef; 0171 0172 /** 0173 * @see llvm::DbgRecord 0174 */ 0175 typedef struct LLVMOpaqueDbgRecord *LLVMDbgRecordRef; 0176 0177 /** 0178 * @} 0179 */ 0180 0181 LLVM_C_EXTERN_C_END 0182 0183 #endif
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|