[ELF] Avoid make in elf::writeARMCmseImportLib
[llvm-project.git] / llvm / include / llvm-c / Types.h
blob4681500ef9da3d3f322e948a3829e09e6ea178a2
1 /*===-- llvm-c/Support.h - C Interface Types declarations ---------*- C -*-===*\
2 |* *|
3 |* Part of the LLVM Project, under the Apache License v2.0 with LLVM *|
4 |* Exceptions. *|
5 |* See https://llvm.org/LICENSE.txt for license information. *|
6 |* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception *|
7 |* *|
8 |*===----------------------------------------------------------------------===*|
9 |* *|
10 |* This file defines types used by the C interface to LLVM. *|
11 |* *|
12 \*===----------------------------------------------------------------------===*/
14 #ifndef LLVM_C_TYPES_H
15 #define LLVM_C_TYPES_H
17 #include "llvm-c/DataTypes.h"
18 #include "llvm-c/ExternC.h"
20 LLVM_C_EXTERN_C_BEGIN
22 /**
23 * @defgroup LLVMCSupportTypes Types and Enumerations
25 * @{
28 typedef int LLVMBool;
30 /* Opaque types. */
32 /**
33 * LLVM uses a polymorphic type hierarchy which C cannot represent, therefore
34 * parameters must be passed as base types. Despite the declared types, most
35 * of the functions provided operate only on branches of the type hierarchy.
36 * The declared parameter names are descriptive and specify which type is
37 * required. Additionally, each type hierarchy is documented along with the
38 * functions that operate upon it. For more detail, refer to LLVM's C++ code.
39 * If in doubt, refer to Core.cpp, which performs parameter downcasts in the
40 * form unwrap<RequiredType>(Param).
43 /**
44 * Used to pass regions of memory through LLVM interfaces.
46 * @see llvm::MemoryBuffer
48 typedef struct LLVMOpaqueMemoryBuffer *LLVMMemoryBufferRef;
50 /**
51 * The top-level container for all LLVM global data. See the LLVMContext class.
53 typedef struct LLVMOpaqueContext *LLVMContextRef;
55 /**
56 * The top-level container for all other LLVM Intermediate Representation (IR)
57 * objects.
59 * @see llvm::Module
61 typedef struct LLVMOpaqueModule *LLVMModuleRef;
63 /**
64 * Each value in the LLVM IR has a type, an LLVMTypeRef.
66 * @see llvm::Type
68 typedef struct LLVMOpaqueType *LLVMTypeRef;
70 /**
71 * Represents an individual value in LLVM IR.
73 * This models llvm::Value.
75 typedef struct LLVMOpaqueValue *LLVMValueRef;
77 /**
78 * Represents a basic block of instructions in LLVM IR.
80 * This models llvm::BasicBlock.
82 typedef struct LLVMOpaqueBasicBlock *LLVMBasicBlockRef;
84 /**
85 * Represents an LLVM Metadata.
87 * This models llvm::Metadata.
89 typedef struct LLVMOpaqueMetadata *LLVMMetadataRef;
91 /**
92 * Represents an LLVM Named Metadata Node.
94 * This models llvm::NamedMDNode.
96 typedef struct LLVMOpaqueNamedMDNode *LLVMNamedMDNodeRef;
98 /**
99 * Represents an entry in a Global Object's metadata attachments.
101 * This models std::pair<unsigned, MDNode *>
103 typedef struct LLVMOpaqueValueMetadataEntry LLVMValueMetadataEntry;
106 * Represents an LLVM basic block builder.
108 * This models llvm::IRBuilder.
110 typedef struct LLVMOpaqueBuilder *LLVMBuilderRef;
113 * Represents an LLVM debug info builder.
115 * This models llvm::DIBuilder.
117 typedef struct LLVMOpaqueDIBuilder *LLVMDIBuilderRef;
120 * Interface used to provide a module to JIT or interpreter.
121 * This is now just a synonym for llvm::Module, but we have to keep using the
122 * different type to keep binary compatibility.
124 typedef struct LLVMOpaqueModuleProvider *LLVMModuleProviderRef;
126 /** @see llvm::PassManagerBase */
127 typedef struct LLVMOpaquePassManager *LLVMPassManagerRef;
130 * Used to get the users and usees of a Value.
132 * @see llvm::Use */
133 typedef struct LLVMOpaqueUse *LLVMUseRef;
136 * @see llvm::OperandBundleDef
138 typedef struct LLVMOpaqueOperandBundle *LLVMOperandBundleRef;
141 * Used to represent an attributes.
143 * @see llvm::Attribute
145 typedef struct LLVMOpaqueAttributeRef *LLVMAttributeRef;
148 * @see llvm::DiagnosticInfo
150 typedef struct LLVMOpaqueDiagnosticInfo *LLVMDiagnosticInfoRef;
153 * @see llvm::Comdat
155 typedef struct LLVMComdat *LLVMComdatRef;
158 * @see llvm::Module::ModuleFlagEntry
160 typedef struct LLVMOpaqueModuleFlagEntry LLVMModuleFlagEntry;
163 * @see llvm::JITEventListener
165 typedef struct LLVMOpaqueJITEventListener *LLVMJITEventListenerRef;
168 * @see llvm::object::Binary
170 typedef struct LLVMOpaqueBinary *LLVMBinaryRef;
173 * @see llvm::DbgRecord
175 typedef struct LLVMOpaqueDbgRecord *LLVMDbgRecordRef;
178 * @}
181 LLVM_C_EXTERN_C_END
183 #endif