llvm/llvm/include/llvm-c/Types.h

/*===-- llvm-c/Support.h - C Interface Types declarations ---------*- C -*-===*\
|*                                                                            *|
|* Part of the LLVM Project, under the Apache License v2.0 with LLVM          *|
|* Exceptions.                                                                *|
|* See https://llvm.org/LICENSE.txt for license information.                  *|
|* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception                    *|
|*                                                                            *|
|*===----------------------------------------------------------------------===*|
|*                                                                            *|
|* This file defines types used by the C interface to LLVM.                   *|
|*                                                                            *|
\*===----------------------------------------------------------------------===*/

#ifndef LLVM_C_TYPES_H
#define LLVM_C_TYPES_H

#include "llvm-c/DataTypes.h"
#include "llvm-c/ExternC.h"

LLVM_C_EXTERN_C_BEGIN

/**
 * @defgroup LLVMCSupportTypes Types and Enumerations
 *
 * @{
 */

LLVMBool;

/* Opaque types. */

/**
 * LLVM uses a polymorphic type hierarchy which C cannot represent, therefore
 * parameters must be passed as base types. Despite the declared types, most
 * of the functions provided operate only on branches of the type hierarchy.
 * The declared parameter names are descriptive and specify which type is
 * required. Additionally, each type hierarchy is documented along with the
 * functions that operate upon it. For more detail, refer to LLVM's C++ code.
 * If in doubt, refer to Core.cpp, which performs parameter downcasts in the
 * form unwrap<RequiredType>(Param).
 */

/**
 * Used to pass regions of memory through LLVM interfaces.
 *
 * @see llvm::MemoryBuffer
 */
LLVMMemoryBufferRef;

/**
 * The top-level container for all LLVM global data. See the LLVMContext class.
 */
LLVMContextRef;

/**
 * The top-level container for all other LLVM Intermediate Representation (IR)
 * objects.
 *
 * @see llvm::Module
 */
LLVMModuleRef;

/**
 * Each value in the LLVM IR has a type, an LLVMTypeRef.
 *
 * @see llvm::Type
 */
LLVMTypeRef;

/**
 * Represents an individual value in LLVM IR.
 *
 * This models llvm::Value.
 */
LLVMValueRef;

/**
 * Represents a basic block of instructions in LLVM IR.
 *
 * This models llvm::BasicBlock.
 */
LLVMBasicBlockRef;

/**
 * Represents an LLVM Metadata.
 *
 * This models llvm::Metadata.
 */
LLVMMetadataRef;

/**
 * Represents an LLVM Named Metadata Node.
 *
 * This models llvm::NamedMDNode.
 */
LLVMNamedMDNodeRef;

/**
 * Represents an entry in a Global Object's metadata attachments.
 *
 * This models std::pair<unsigned, MDNode *>
 */
LLVMValueMetadataEntry;

/**
 * Represents an LLVM basic block builder.
 *
 * This models llvm::IRBuilder.
 */
LLVMBuilderRef;

/**
 * Represents an LLVM debug info builder.
 *
 * This models llvm::DIBuilder.
 */
LLVMDIBuilderRef;

/**
 * Interface used to provide a module to JIT or interpreter.
 * This is now just a synonym for llvm::Module, but we have to keep using the
 * different type to keep binary compatibility.
 */
LLVMModuleProviderRef;

/** @see llvm::PassManagerBase */
LLVMPassManagerRef;

/**
 * Used to get the users and usees of a Value.
 *
 * @see llvm::Use */
LLVMUseRef;

/**
 * @see llvm::OperandBundleDef
 */
LLVMOperandBundleRef;

/**
 * Used to represent an attributes.
 *
 * @see llvm::Attribute
 */
LLVMAttributeRef;

/**
 * @see llvm::DiagnosticInfo
 */
LLVMDiagnosticInfoRef;

/**
 * @see llvm::Comdat
 */
LLVMComdatRef;

/**
 * @see llvm::Module::ModuleFlagEntry
 */
LLVMModuleFlagEntry;

/**
 * @see llvm::JITEventListener
 */
LLVMJITEventListenerRef;

/**
 * @see llvm::object::Binary
 */
LLVMBinaryRef;

/**
 * @see llvm::DbgRecord
 */
LLVMDbgRecordRef;

/**
 * @}
 */

LLVM_C_EXTERN_C_END

#endif