llvm/llvm/lib/IR/Core.cpp

//===-- Core.cpp ----------------------------------------------------------===//
//
// 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 implements the common infrastructure (including the C bindings)
// for libLLVMCore.a, which implements the LLVM intermediate representation.
//
//===----------------------------------------------------------------------===//

#include "llvm-c/Core.h"
#include "llvm/IR/Attributes.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/ConstantRange.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DebugInfoMetadata.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/DiagnosticInfo.h"
#include "llvm/IR/DiagnosticPrinter.h"
#include "llvm/IR/GlobalAlias.h"
#include "llvm/IR/GlobalVariable.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/InlineAsm.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/LegacyPassManager.h"
#include "llvm/IR/Module.h"
#include "llvm/InitializePasses.h"
#include "llvm/PassRegistry.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Threading.h"
#include "llvm/Support/raw_ostream.h"
#include <cassert>
#include <cstdlib>
#include <cstring>
#include <system_error>

usingnamespacellvm;

DEFINE_SIMPLE_CONVERSION_FUNCTIONS()

inline BasicBlock **unwrap(LLVMBasicBlockRef *BBs) {}

#define DEBUG_TYPE

void llvm::initializeCore(PassRegistry &Registry) {}

void LLVMShutdown() {}

/*===-- Version query -----------------------------------------------------===*/

void LLVMGetVersion(unsigned *Major, unsigned *Minor, unsigned *Patch) {}

/*===-- Error handling ----------------------------------------------------===*/

char *LLVMCreateMessage(const char *Message) {}

void LLVMDisposeMessage(char *Message) {}


/*===-- Operations on contexts --------------------------------------------===*/

static LLVMContext &getGlobalContext() {}

LLVMContextRef LLVMContextCreate() {}

LLVMContextRef LLVMGetGlobalContext() {}

void LLVMContextSetDiagnosticHandler(LLVMContextRef C,
                                     LLVMDiagnosticHandler Handler,
                                     void *DiagnosticContext) {}

LLVMDiagnosticHandler LLVMContextGetDiagnosticHandler(LLVMContextRef C) {}

void *LLVMContextGetDiagnosticContext(LLVMContextRef C) {}

void LLVMContextSetYieldCallback(LLVMContextRef C, LLVMYieldCallback Callback,
                                 void *OpaqueHandle) {}

LLVMBool LLVMContextShouldDiscardValueNames(LLVMContextRef C) {}

void LLVMContextSetDiscardValueNames(LLVMContextRef C, LLVMBool Discard) {}

void LLVMContextDispose(LLVMContextRef C) {}

unsigned LLVMGetMDKindIDInContext(LLVMContextRef C, const char *Name,
                                  unsigned SLen) {}

unsigned LLVMGetMDKindID(const char *Name, unsigned SLen) {}

unsigned LLVMGetSyncScopeID(LLVMContextRef C, const char *Name, size_t SLen) {}

unsigned LLVMGetEnumAttributeKindForName(const char *Name, size_t SLen) {}

unsigned LLVMGetLastEnumAttributeKind(void) {}

LLVMAttributeRef LLVMCreateEnumAttribute(LLVMContextRef C, unsigned KindID,
                                         uint64_t Val) {}

unsigned LLVMGetEnumAttributeKind(LLVMAttributeRef A) {}

uint64_t LLVMGetEnumAttributeValue(LLVMAttributeRef A) {}

LLVMAttributeRef LLVMCreateTypeAttribute(LLVMContextRef C, unsigned KindID,
                                         LLVMTypeRef type_ref) {}

LLVMTypeRef LLVMGetTypeAttributeValue(LLVMAttributeRef A) {}

LLVMAttributeRef LLVMCreateConstantRangeAttribute(LLVMContextRef C,
                                                  unsigned KindID,
                                                  unsigned NumBits,
                                                  const uint64_t LowerWords[],
                                                  const uint64_t UpperWords[]) {}

LLVMAttributeRef LLVMCreateStringAttribute(LLVMContextRef C,
                                           const char *K, unsigned KLength,
                                           const char *V, unsigned VLength) {}

const char *LLVMGetStringAttributeKind(LLVMAttributeRef A,
                                       unsigned *Length) {}

const char *LLVMGetStringAttributeValue(LLVMAttributeRef A,
                                        unsigned *Length) {}

LLVMBool LLVMIsEnumAttribute(LLVMAttributeRef A) {}

LLVMBool LLVMIsStringAttribute(LLVMAttributeRef A) {}

LLVMBool LLVMIsTypeAttribute(LLVMAttributeRef A) {}

char *LLVMGetDiagInfoDescription(LLVMDiagnosticInfoRef DI) {}

LLVMDiagnosticSeverity LLVMGetDiagInfoSeverity(LLVMDiagnosticInfoRef DI) {}

/*===-- Operations on modules ---------------------------------------------===*/

LLVMModuleRef LLVMModuleCreateWithName(const char *ModuleID) {}

LLVMModuleRef LLVMModuleCreateWithNameInContext(const char *ModuleID,
                                                LLVMContextRef C) {}

void LLVMDisposeModule(LLVMModuleRef M) {}

const char *LLVMGetModuleIdentifier(LLVMModuleRef M, size_t *Len) {}

void LLVMSetModuleIdentifier(LLVMModuleRef M, const char *Ident, size_t Len) {}

const char *LLVMGetSourceFileName(LLVMModuleRef M, size_t *Len) {}

void LLVMSetSourceFileName(LLVMModuleRef M, const char *Name, size_t Len) {}

/*--.. Data layout .........................................................--*/
const char *LLVMGetDataLayoutStr(LLVMModuleRef M) {}

const char *LLVMGetDataLayout(LLVMModuleRef M) {}

void LLVMSetDataLayout(LLVMModuleRef M, const char *DataLayoutStr) {}

/*--.. Target triple .......................................................--*/
const char * LLVMGetTarget(LLVMModuleRef M) {}

void LLVMSetTarget(LLVMModuleRef M, const char *Triple) {}

/*--.. Module flags ........................................................--*/
struct LLVMOpaqueModuleFlagEntry {};

static Module::ModFlagBehavior
map_to_llvmModFlagBehavior(LLVMModuleFlagBehavior Behavior) {}

static LLVMModuleFlagBehavior
map_from_llvmModFlagBehavior(Module::ModFlagBehavior Behavior) {}

LLVMModuleFlagEntry *LLVMCopyModuleFlagsMetadata(LLVMModuleRef M, size_t *Len) {}

void LLVMDisposeModuleFlagsMetadata(LLVMModuleFlagEntry *Entries) {}

LLVMModuleFlagBehavior
LLVMModuleFlagEntriesGetFlagBehavior(LLVMModuleFlagEntry *Entries,
                                     unsigned Index) {}

const char *LLVMModuleFlagEntriesGetKey(LLVMModuleFlagEntry *Entries,
                                        unsigned Index, size_t *Len) {}

LLVMMetadataRef LLVMModuleFlagEntriesGetMetadata(LLVMModuleFlagEntry *Entries,
                                                 unsigned Index) {}

LLVMMetadataRef LLVMGetModuleFlag(LLVMModuleRef M,
                                  const char *Key, size_t KeyLen) {}

void LLVMAddModuleFlag(LLVMModuleRef M, LLVMModuleFlagBehavior Behavior,
                       const char *Key, size_t KeyLen,
                       LLVMMetadataRef Val) {}

LLVMBool LLVMIsNewDbgInfoFormat(LLVMModuleRef M) {}

void LLVMSetIsNewDbgInfoFormat(LLVMModuleRef M, LLVMBool UseNewFormat) {}

/*--.. Printing modules ....................................................--*/

void LLVMDumpModule(LLVMModuleRef M) {}

LLVMBool LLVMPrintModuleToFile(LLVMModuleRef M, const char *Filename,
                               char **ErrorMessage) {}

char *LLVMPrintModuleToString(LLVMModuleRef M) {}

/*--.. Operations on inline assembler ......................................--*/
void LLVMSetModuleInlineAsm2(LLVMModuleRef M, const char *Asm, size_t Len) {}

void LLVMSetModuleInlineAsm(LLVMModuleRef M, const char *Asm) {}

void LLVMAppendModuleInlineAsm(LLVMModuleRef M, const char *Asm, size_t Len) {}

const char *LLVMGetModuleInlineAsm(LLVMModuleRef M, size_t *Len) {}

LLVMValueRef LLVMGetInlineAsm(LLVMTypeRef Ty, const char *AsmString,
                              size_t AsmStringSize, const char *Constraints,
                              size_t ConstraintsSize, LLVMBool HasSideEffects,
                              LLVMBool IsAlignStack,
                              LLVMInlineAsmDialect Dialect, LLVMBool CanThrow) {}

const char *LLVMGetInlineAsmAsmString(LLVMValueRef InlineAsmVal, size_t *Len) {}

const char *LLVMGetInlineAsmConstraintString(LLVMValueRef InlineAsmVal,
                                             size_t *Len) {}

LLVMInlineAsmDialect LLVMGetInlineAsmDialect(LLVMValueRef InlineAsmVal) {}

LLVMTypeRef LLVMGetInlineAsmFunctionType(LLVMValueRef InlineAsmVal) {}

LLVMBool LLVMGetInlineAsmHasSideEffects(LLVMValueRef InlineAsmVal) {}

LLVMBool LLVMGetInlineAsmNeedsAlignedStack(LLVMValueRef InlineAsmVal) {}

LLVMBool LLVMGetInlineAsmCanUnwind(LLVMValueRef InlineAsmVal) {}

/*--.. Operations on module contexts ......................................--*/
LLVMContextRef LLVMGetModuleContext(LLVMModuleRef M) {}


/*===-- Operations on types -----------------------------------------------===*/

/*--.. Operations on all types (mostly) ....................................--*/

LLVMTypeKind LLVMGetTypeKind(LLVMTypeRef Ty) {}

LLVMBool LLVMTypeIsSized(LLVMTypeRef Ty)
{}

LLVMContextRef LLVMGetTypeContext(LLVMTypeRef Ty) {}

void LLVMDumpType(LLVMTypeRef Ty) {}

char *LLVMPrintTypeToString(LLVMTypeRef Ty) {}

/*--.. Operations on integer types .........................................--*/

LLVMTypeRef LLVMInt1TypeInContext(LLVMContextRef C)  {}
LLVMTypeRef LLVMInt8TypeInContext(LLVMContextRef C)  {}
LLVMTypeRef LLVMInt16TypeInContext(LLVMContextRef C) {}
LLVMTypeRef LLVMInt32TypeInContext(LLVMContextRef C) {}
LLVMTypeRef LLVMInt64TypeInContext(LLVMContextRef C) {}
LLVMTypeRef LLVMInt128TypeInContext(LLVMContextRef C) {}
LLVMTypeRef LLVMIntTypeInContext(LLVMContextRef C, unsigned NumBits) {}

LLVMTypeRef LLVMInt1Type(void)  {}
LLVMTypeRef LLVMInt8Type(void)  {}
LLVMTypeRef LLVMInt16Type(void) {}
LLVMTypeRef LLVMInt32Type(void) {}
LLVMTypeRef LLVMInt64Type(void) {}
LLVMTypeRef LLVMInt128Type(void) {}
LLVMTypeRef LLVMIntType(unsigned NumBits) {}

unsigned LLVMGetIntTypeWidth(LLVMTypeRef IntegerTy) {}

/*--.. Operations on real types ............................................--*/

LLVMTypeRef LLVMHalfTypeInContext(LLVMContextRef C) {}
LLVMTypeRef LLVMBFloatTypeInContext(LLVMContextRef C) {}
LLVMTypeRef LLVMFloatTypeInContext(LLVMContextRef C) {}
LLVMTypeRef LLVMDoubleTypeInContext(LLVMContextRef C) {}
LLVMTypeRef LLVMX86FP80TypeInContext(LLVMContextRef C) {}
LLVMTypeRef LLVMFP128TypeInContext(LLVMContextRef C) {}
LLVMTypeRef LLVMPPCFP128TypeInContext(LLVMContextRef C) {}
LLVMTypeRef LLVMX86AMXTypeInContext(LLVMContextRef C) {}

LLVMTypeRef LLVMHalfType(void) {}
LLVMTypeRef LLVMBFloatType(void) {}
LLVMTypeRef LLVMFloatType(void) {}
LLVMTypeRef LLVMDoubleType(void) {}
LLVMTypeRef LLVMX86FP80Type(void) {}
LLVMTypeRef LLVMFP128Type(void) {}
LLVMTypeRef LLVMPPCFP128Type(void) {}
LLVMTypeRef LLVMX86AMXType(void) {}

/*--.. Operations on function types ........................................--*/

LLVMTypeRef LLVMFunctionType(LLVMTypeRef ReturnType,
                             LLVMTypeRef *ParamTypes, unsigned ParamCount,
                             LLVMBool IsVarArg) {}

LLVMBool LLVMIsFunctionVarArg(LLVMTypeRef FunctionTy) {}

LLVMTypeRef LLVMGetReturnType(LLVMTypeRef FunctionTy) {}

unsigned LLVMCountParamTypes(LLVMTypeRef FunctionTy) {}

void LLVMGetParamTypes(LLVMTypeRef FunctionTy, LLVMTypeRef *Dest) {}

/*--.. Operations on struct types ..........................................--*/

LLVMTypeRef LLVMStructTypeInContext(LLVMContextRef C, LLVMTypeRef *ElementTypes,
                           unsigned ElementCount, LLVMBool Packed) {}

LLVMTypeRef LLVMStructType(LLVMTypeRef *ElementTypes,
                           unsigned ElementCount, LLVMBool Packed) {}

LLVMTypeRef LLVMStructCreateNamed(LLVMContextRef C, const char *Name)
{}

const char *LLVMGetStructName(LLVMTypeRef Ty)
{}

void LLVMStructSetBody(LLVMTypeRef StructTy, LLVMTypeRef *ElementTypes,
                       unsigned ElementCount, LLVMBool Packed) {}

unsigned LLVMCountStructElementTypes(LLVMTypeRef StructTy) {}

void LLVMGetStructElementTypes(LLVMTypeRef StructTy, LLVMTypeRef *Dest) {}

LLVMTypeRef LLVMStructGetTypeAtIndex(LLVMTypeRef StructTy, unsigned i) {}

LLVMBool LLVMIsPackedStruct(LLVMTypeRef StructTy) {}

LLVMBool LLVMIsOpaqueStruct(LLVMTypeRef StructTy) {}

LLVMBool LLVMIsLiteralStruct(LLVMTypeRef StructTy) {}

LLVMTypeRef LLVMGetTypeByName(LLVMModuleRef M, const char *Name) {}

LLVMTypeRef LLVMGetTypeByName2(LLVMContextRef C, const char *Name) {}

/*--.. Operations on array, pointer, and vector types (sequence types) .....--*/

void LLVMGetSubtypes(LLVMTypeRef Tp, LLVMTypeRef *Arr) {}

LLVMTypeRef LLVMArrayType(LLVMTypeRef ElementType, unsigned ElementCount) {}

LLVMTypeRef LLVMArrayType2(LLVMTypeRef ElementType, uint64_t ElementCount) {}

LLVMTypeRef LLVMPointerType(LLVMTypeRef ElementType, unsigned AddressSpace) {}

LLVMBool LLVMPointerTypeIsOpaque(LLVMTypeRef Ty) {}

LLVMTypeRef LLVMVectorType(LLVMTypeRef ElementType, unsigned ElementCount) {}

LLVMTypeRef LLVMScalableVectorType(LLVMTypeRef ElementType,
                                   unsigned ElementCount) {}

LLVMTypeRef LLVMGetElementType(LLVMTypeRef WrappedTy) {}

unsigned LLVMGetNumContainedTypes(LLVMTypeRef Tp) {}

unsigned LLVMGetArrayLength(LLVMTypeRef ArrayTy) {}

uint64_t LLVMGetArrayLength2(LLVMTypeRef ArrayTy) {}

unsigned LLVMGetPointerAddressSpace(LLVMTypeRef PointerTy) {}

unsigned LLVMGetVectorSize(LLVMTypeRef VectorTy) {}

LLVMValueRef LLVMGetConstantPtrAuthPointer(LLVMValueRef PtrAuth) {}

LLVMValueRef LLVMGetConstantPtrAuthKey(LLVMValueRef PtrAuth) {}

LLVMValueRef LLVMGetConstantPtrAuthDiscriminator(LLVMValueRef PtrAuth) {}

LLVMValueRef LLVMGetConstantPtrAuthAddrDiscriminator(LLVMValueRef PtrAuth) {}

/*--.. Operations on other types ...........................................--*/

LLVMTypeRef LLVMPointerTypeInContext(LLVMContextRef C, unsigned AddressSpace) {}

LLVMTypeRef LLVMVoidTypeInContext(LLVMContextRef C)  {}
LLVMTypeRef LLVMLabelTypeInContext(LLVMContextRef C) {}
LLVMTypeRef LLVMTokenTypeInContext(LLVMContextRef C) {}
LLVMTypeRef LLVMMetadataTypeInContext(LLVMContextRef C) {}

LLVMTypeRef LLVMVoidType(void)  {}
LLVMTypeRef LLVMLabelType(void) {}

LLVMTypeRef LLVMTargetExtTypeInContext(LLVMContextRef C, const char *Name,
                                       LLVMTypeRef *TypeParams,
                                       unsigned TypeParamCount,
                                       unsigned *IntParams,
                                       unsigned IntParamCount) {}

const char *LLVMGetTargetExtTypeName(LLVMTypeRef TargetExtTy) {}

unsigned LLVMGetTargetExtTypeNumTypeParams(LLVMTypeRef TargetExtTy) {}

LLVMTypeRef LLVMGetTargetExtTypeTypeParam(LLVMTypeRef TargetExtTy,
                                          unsigned Idx) {}

unsigned LLVMGetTargetExtTypeNumIntParams(LLVMTypeRef TargetExtTy) {}

unsigned LLVMGetTargetExtTypeIntParam(LLVMTypeRef TargetExtTy, unsigned Idx) {}

/*===-- Operations on values ----------------------------------------------===*/

/*--.. Operations on all values ............................................--*/

LLVMTypeRef LLVMTypeOf(LLVMValueRef Val) {}

LLVMValueKind LLVMGetValueKind(LLVMValueRef Val) {}

const char *LLVMGetValueName2(LLVMValueRef Val, size_t *Length) {}

void LLVMSetValueName2(LLVMValueRef Val, const char *Name, size_t NameLen) {}

const char *LLVMGetValueName(LLVMValueRef Val) {}

void LLVMSetValueName(LLVMValueRef Val, const char *Name) {}

void LLVMDumpValue(LLVMValueRef Val) {}

char* LLVMPrintValueToString(LLVMValueRef Val) {}

LLVMContextRef LLVMGetValueContext(LLVMValueRef Val) {}

char *LLVMPrintDbgRecordToString(LLVMDbgRecordRef Record) {}

void LLVMReplaceAllUsesWith(LLVMValueRef OldVal, LLVMValueRef NewVal) {}

int LLVMHasMetadata(LLVMValueRef Inst) {}

LLVMValueRef LLVMGetMetadata(LLVMValueRef Inst, unsigned KindID) {}

// MetadataAsValue uses a canonical format which strips the actual MDNode for
// MDNode with just a single constant value, storing just a ConstantAsMetadata
// This undoes this canonicalization, reconstructing the MDNode.
static MDNode *extractMDNode(MetadataAsValue *MAV) {}

void LLVMSetMetadata(LLVMValueRef Inst, unsigned KindID, LLVMValueRef Val) {}

struct LLVMOpaqueValueMetadataEntry {};

MetadataEntries;
static LLVMValueMetadataEntry *
llvm_getMetadata(size_t *NumEntries,
                 llvm::function_ref<void(MetadataEntries &)> AccessMD) {}

LLVMValueMetadataEntry *
LLVMInstructionGetAllMetadataOtherThanDebugLoc(LLVMValueRef Value,
                                               size_t *NumEntries) {}

/*--.. Conversion functions ................................................--*/

#define LLVM_DEFINE_VALUE_CAST(name)

LLVM_FOR_EACH_VALUE_SUBCLASS()

LLVMValueRef LLVMIsAMDNode(LLVMValueRef Val) {}

LLVMValueRef LLVMIsAValueAsMetadata(LLVMValueRef Val) {}

LLVMValueRef LLVMIsAMDString(LLVMValueRef Val) {}

/*--.. Operations on Uses ..................................................--*/
LLVMUseRef LLVMGetFirstUse(LLVMValueRef Val) {}

LLVMUseRef LLVMGetNextUse(LLVMUseRef U) {}

LLVMValueRef LLVMGetUser(LLVMUseRef U) {}

LLVMValueRef LLVMGetUsedValue(LLVMUseRef U) {}

/*--.. Operations on Users .................................................--*/

static LLVMValueRef getMDNodeOperandImpl(LLVMContext &Context, const MDNode *N,
                                         unsigned Index) {}

LLVMValueRef LLVMGetOperand(LLVMValueRef Val, unsigned Index) {}

LLVMUseRef LLVMGetOperandUse(LLVMValueRef Val, unsigned Index) {}

void LLVMSetOperand(LLVMValueRef Val, unsigned Index, LLVMValueRef Op) {}

int LLVMGetNumOperands(LLVMValueRef Val) {}

/*--.. Operations on constants of any type .................................--*/

LLVMValueRef LLVMConstNull(LLVMTypeRef Ty) {}

LLVMValueRef LLVMConstAllOnes(LLVMTypeRef Ty) {}

LLVMValueRef LLVMGetUndef(LLVMTypeRef Ty) {}

LLVMValueRef LLVMGetPoison(LLVMTypeRef Ty) {}

LLVMBool LLVMIsConstant(LLVMValueRef Ty) {}

LLVMBool LLVMIsNull(LLVMValueRef Val) {}

LLVMBool LLVMIsUndef(LLVMValueRef Val) {}

LLVMBool LLVMIsPoison(LLVMValueRef Val) {}

LLVMValueRef LLVMConstPointerNull(LLVMTypeRef Ty) {}

/*--.. Operations on metadata nodes ........................................--*/

LLVMMetadataRef LLVMMDStringInContext2(LLVMContextRef C, const char *Str,
                                       size_t SLen) {}

LLVMMetadataRef LLVMMDNodeInContext2(LLVMContextRef C, LLVMMetadataRef *MDs,
                                     size_t Count) {}

LLVMValueRef LLVMMDStringInContext(LLVMContextRef C, const char *Str,
                                   unsigned SLen) {}

LLVMValueRef LLVMMDString(const char *Str, unsigned SLen) {}

LLVMValueRef LLVMMDNodeInContext(LLVMContextRef C, LLVMValueRef *Vals,
                                 unsigned Count) {}

LLVMValueRef LLVMMDNode(LLVMValueRef *Vals, unsigned Count) {}

LLVMValueRef LLVMMetadataAsValue(LLVMContextRef C, LLVMMetadataRef MD) {}

LLVMMetadataRef LLVMValueAsMetadata(LLVMValueRef Val) {}

const char *LLVMGetMDString(LLVMValueRef V, unsigned *Length) {}

unsigned LLVMGetMDNodeNumOperands(LLVMValueRef V) {}

LLVMNamedMDNodeRef LLVMGetFirstNamedMetadata(LLVMModuleRef M) {}

LLVMNamedMDNodeRef LLVMGetLastNamedMetadata(LLVMModuleRef M) {}

LLVMNamedMDNodeRef LLVMGetNextNamedMetadata(LLVMNamedMDNodeRef NMD) {}

LLVMNamedMDNodeRef LLVMGetPreviousNamedMetadata(LLVMNamedMDNodeRef NMD) {}

LLVMNamedMDNodeRef LLVMGetNamedMetadata(LLVMModuleRef M,
                                        const char *Name, size_t NameLen) {}

LLVMNamedMDNodeRef LLVMGetOrInsertNamedMetadata(LLVMModuleRef M,
                                                const char *Name, size_t NameLen) {}

const char *LLVMGetNamedMetadataName(LLVMNamedMDNodeRef NMD, size_t *NameLen) {}

void LLVMGetMDNodeOperands(LLVMValueRef V, LLVMValueRef *Dest) {}

void LLVMReplaceMDNodeOperandWith(LLVMValueRef V, unsigned Index,
                                  LLVMMetadataRef Replacement) {}

unsigned LLVMGetNamedMetadataNumOperands(LLVMModuleRef M, const char *Name) {}

void LLVMGetNamedMetadataOperands(LLVMModuleRef M, const char *Name,
                                  LLVMValueRef *Dest) {}

void LLVMAddNamedMetadataOperand(LLVMModuleRef M, const char *Name,
                                 LLVMValueRef Val) {}

const char *LLVMGetDebugLocDirectory(LLVMValueRef Val, unsigned *Length) {}

const char *LLVMGetDebugLocFilename(LLVMValueRef Val, unsigned *Length) {}

unsigned LLVMGetDebugLocLine(LLVMValueRef Val) {}

unsigned LLVMGetDebugLocColumn(LLVMValueRef Val) {}

/*--.. Operations on scalar constants ......................................--*/

LLVMValueRef LLVMConstInt(LLVMTypeRef IntTy, unsigned long long N,
                          LLVMBool SignExtend) {}

LLVMValueRef LLVMConstIntOfArbitraryPrecision(LLVMTypeRef IntTy,
                                              unsigned NumWords,
                                              const uint64_t Words[]) {}

LLVMValueRef LLVMConstIntOfString(LLVMTypeRef IntTy, const char Str[],
                                  uint8_t Radix) {}

LLVMValueRef LLVMConstIntOfStringAndSize(LLVMTypeRef IntTy, const char Str[],
                                         unsigned SLen, uint8_t Radix) {}

LLVMValueRef LLVMConstReal(LLVMTypeRef RealTy, double N) {}

LLVMValueRef LLVMConstRealOfString(LLVMTypeRef RealTy, const char *Text) {}

LLVMValueRef LLVMConstRealOfStringAndSize(LLVMTypeRef RealTy, const char Str[],
                                          unsigned SLen) {}

unsigned long long LLVMConstIntGetZExtValue(LLVMValueRef ConstantVal) {}

long long LLVMConstIntGetSExtValue(LLVMValueRef ConstantVal) {}

double LLVMConstRealGetDouble(LLVMValueRef ConstantVal, LLVMBool *LosesInfo) {}

/*--.. Operations on composite constants ...................................--*/

LLVMValueRef LLVMConstStringInContext(LLVMContextRef C, const char *Str,
                                      unsigned Length,
                                      LLVMBool DontNullTerminate) {}

LLVMValueRef LLVMConstStringInContext2(LLVMContextRef C, const char *Str,
                                       size_t Length,
                                       LLVMBool DontNullTerminate) {}

LLVMValueRef LLVMConstString(const char *Str, unsigned Length,
                             LLVMBool DontNullTerminate) {}

LLVMValueRef LLVMGetAggregateElement(LLVMValueRef C, unsigned Idx) {}

LLVMValueRef LLVMGetElementAsConstant(LLVMValueRef C, unsigned idx) {}

LLVMBool LLVMIsConstantString(LLVMValueRef C) {}

const char *LLVMGetAsString(LLVMValueRef C, size_t *Length) {}

LLVMValueRef LLVMConstArray(LLVMTypeRef ElementTy,
                            LLVMValueRef *ConstantVals, unsigned Length) {}

LLVMValueRef LLVMConstArray2(LLVMTypeRef ElementTy, LLVMValueRef *ConstantVals,
                             uint64_t Length) {}

LLVMValueRef LLVMConstStructInContext(LLVMContextRef C,
                                      LLVMValueRef *ConstantVals,
                                      unsigned Count, LLVMBool Packed) {}

LLVMValueRef LLVMConstStruct(LLVMValueRef *ConstantVals, unsigned Count,
                             LLVMBool Packed) {}

LLVMValueRef LLVMConstNamedStruct(LLVMTypeRef StructTy,
                                  LLVMValueRef *ConstantVals,
                                  unsigned Count) {}

LLVMValueRef LLVMConstVector(LLVMValueRef *ScalarConstantVals, unsigned Size) {}

LLVMValueRef LLVMConstantPtrAuth(LLVMValueRef Ptr, LLVMValueRef Key,
                                 LLVMValueRef Disc, LLVMValueRef AddrDisc) {}

/*-- Opcode mapping */

static LLVMOpcode map_to_llvmopcode(int opcode)
{}

static int map_from_llvmopcode(LLVMOpcode code)
{}

/*-- GEP wrap flag conversions */

static GEPNoWrapFlags mapFromLLVMGEPNoWrapFlags(LLVMGEPNoWrapFlags GEPFlags) {}

static LLVMGEPNoWrapFlags mapToLLVMGEPNoWrapFlags(GEPNoWrapFlags GEPFlags) {}

/*--.. Constant expressions ................................................--*/

LLVMOpcode LLVMGetConstOpcode(LLVMValueRef ConstantVal) {}

LLVMValueRef LLVMAlignOf(LLVMTypeRef Ty) {}

LLVMValueRef LLVMSizeOf(LLVMTypeRef Ty) {}

LLVMValueRef LLVMConstNeg(LLVMValueRef ConstantVal) {}

LLVMValueRef LLVMConstNSWNeg(LLVMValueRef ConstantVal) {}

LLVMValueRef LLVMConstNUWNeg(LLVMValueRef ConstantVal) {}


LLVMValueRef LLVMConstNot(LLVMValueRef ConstantVal) {}

LLVMValueRef LLVMConstAdd(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant) {}

LLVMValueRef LLVMConstNSWAdd(LLVMValueRef LHSConstant,
                             LLVMValueRef RHSConstant) {}

LLVMValueRef LLVMConstNUWAdd(LLVMValueRef LHSConstant,
                             LLVMValueRef RHSConstant) {}

LLVMValueRef LLVMConstSub(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant) {}

LLVMValueRef LLVMConstNSWSub(LLVMValueRef LHSConstant,
                             LLVMValueRef RHSConstant) {}

LLVMValueRef LLVMConstNUWSub(LLVMValueRef LHSConstant,
                             LLVMValueRef RHSConstant) {}

LLVMValueRef LLVMConstMul(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant) {}

LLVMValueRef LLVMConstNSWMul(LLVMValueRef LHSConstant,
                             LLVMValueRef RHSConstant) {}

LLVMValueRef LLVMConstNUWMul(LLVMValueRef LHSConstant,
                             LLVMValueRef RHSConstant) {}

LLVMValueRef LLVMConstXor(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant) {}

LLVMValueRef LLVMConstGEP2(LLVMTypeRef Ty, LLVMValueRef ConstantVal,
                           LLVMValueRef *ConstantIndices, unsigned NumIndices) {}

LLVMValueRef LLVMConstInBoundsGEP2(LLVMTypeRef Ty, LLVMValueRef ConstantVal,
                                   LLVMValueRef *ConstantIndices,
                                   unsigned NumIndices) {}

LLVMValueRef LLVMConstGEPWithNoWrapFlags(LLVMTypeRef Ty,
                                         LLVMValueRef ConstantVal,
                                         LLVMValueRef *ConstantIndices,
                                         unsigned NumIndices,
                                         LLVMGEPNoWrapFlags NoWrapFlags) {}

LLVMValueRef LLVMConstTrunc(LLVMValueRef ConstantVal, LLVMTypeRef ToType) {}

LLVMValueRef LLVMConstPtrToInt(LLVMValueRef ConstantVal, LLVMTypeRef ToType) {}

LLVMValueRef LLVMConstIntToPtr(LLVMValueRef ConstantVal, LLVMTypeRef ToType) {}

LLVMValueRef LLVMConstBitCast(LLVMValueRef ConstantVal, LLVMTypeRef ToType) {}

LLVMValueRef LLVMConstAddrSpaceCast(LLVMValueRef ConstantVal,
                                    LLVMTypeRef ToType) {}

LLVMValueRef LLVMConstTruncOrBitCast(LLVMValueRef ConstantVal,
                                     LLVMTypeRef ToType) {}

LLVMValueRef LLVMConstPointerCast(LLVMValueRef ConstantVal,
                                  LLVMTypeRef ToType) {}

LLVMValueRef LLVMConstExtractElement(LLVMValueRef VectorConstant,
                                     LLVMValueRef IndexConstant) {}

LLVMValueRef LLVMConstInsertElement(LLVMValueRef VectorConstant,
                                    LLVMValueRef ElementValueConstant,
                                    LLVMValueRef IndexConstant) {}

LLVMValueRef LLVMConstShuffleVector(LLVMValueRef VectorAConstant,
                                    LLVMValueRef VectorBConstant,
                                    LLVMValueRef MaskConstant) {}

LLVMValueRef LLVMConstInlineAsm(LLVMTypeRef Ty, const char *AsmString,
                                const char *Constraints,
                                LLVMBool HasSideEffects,
                                LLVMBool IsAlignStack) {}

LLVMValueRef LLVMBlockAddress(LLVMValueRef F, LLVMBasicBlockRef BB) {}

LLVMValueRef LLVMGetBlockAddressFunction(LLVMValueRef BlockAddr) {}

LLVMBasicBlockRef LLVMGetBlockAddressBasicBlock(LLVMValueRef BlockAddr) {}

/*--.. Operations on global variables, functions, and aliases (globals) ....--*/

LLVMModuleRef LLVMGetGlobalParent(LLVMValueRef Global) {}

LLVMBool LLVMIsDeclaration(LLVMValueRef Global) {}

LLVMLinkage LLVMGetLinkage(LLVMValueRef Global) {}

void LLVMSetLinkage(LLVMValueRef Global, LLVMLinkage Linkage) {}

const char *LLVMGetSection(LLVMValueRef Global) {}

void LLVMSetSection(LLVMValueRef Global, const char *Section) {}

LLVMVisibility LLVMGetVisibility(LLVMValueRef Global) {}

void LLVMSetVisibility(LLVMValueRef Global, LLVMVisibility Viz) {}

LLVMDLLStorageClass LLVMGetDLLStorageClass(LLVMValueRef Global) {}

void LLVMSetDLLStorageClass(LLVMValueRef Global, LLVMDLLStorageClass Class) {}

LLVMUnnamedAddr LLVMGetUnnamedAddress(LLVMValueRef Global) {}

void LLVMSetUnnamedAddress(LLVMValueRef Global, LLVMUnnamedAddr UnnamedAddr) {}

LLVMBool LLVMHasUnnamedAddr(LLVMValueRef Global) {}

void LLVMSetUnnamedAddr(LLVMValueRef Global, LLVMBool HasUnnamedAddr) {}

LLVMTypeRef LLVMGlobalGetValueType(LLVMValueRef Global) {}

/*--.. Operations on global variables, load and store instructions .........--*/

unsigned LLVMGetAlignment(LLVMValueRef V) {}

void LLVMSetAlignment(LLVMValueRef V, unsigned Bytes) {}

LLVMValueMetadataEntry *LLVMGlobalCopyAllMetadata(LLVMValueRef Value,
                                                  size_t *NumEntries) {}

unsigned LLVMValueMetadataEntriesGetKind(LLVMValueMetadataEntry *Entries,
                                         unsigned Index) {}

LLVMMetadataRef
LLVMValueMetadataEntriesGetMetadata(LLVMValueMetadataEntry *Entries,
                                    unsigned Index) {}

void LLVMDisposeValueMetadataEntries(LLVMValueMetadataEntry *Entries) {}

void LLVMGlobalSetMetadata(LLVMValueRef Global, unsigned Kind,
                           LLVMMetadataRef MD) {}

void LLVMGlobalEraseMetadata(LLVMValueRef Global, unsigned Kind) {}

void LLVMGlobalClearMetadata(LLVMValueRef Global) {}

/*--.. Operations on global variables ......................................--*/

LLVMValueRef LLVMAddGlobal(LLVMModuleRef M, LLVMTypeRef Ty, const char *Name) {}

LLVMValueRef LLVMAddGlobalInAddressSpace(LLVMModuleRef M, LLVMTypeRef Ty,
                                         const char *Name,
                                         unsigned AddressSpace) {}

LLVMValueRef LLVMGetNamedGlobal(LLVMModuleRef M, const char *Name) {}

LLVMValueRef LLVMGetNamedGlobalWithLength(LLVMModuleRef M, const char *Name,
                                          size_t Length) {}

LLVMValueRef LLVMGetFirstGlobal(LLVMModuleRef M) {}

LLVMValueRef LLVMGetLastGlobal(LLVMModuleRef M) {}

LLVMValueRef LLVMGetNextGlobal(LLVMValueRef GlobalVar) {}

LLVMValueRef LLVMGetPreviousGlobal(LLVMValueRef GlobalVar) {}

void LLVMDeleteGlobal(LLVMValueRef GlobalVar) {}

LLVMValueRef LLVMGetInitializer(LLVMValueRef GlobalVar) {}

void LLVMSetInitializer(LLVMValueRef GlobalVar, LLVMValueRef ConstantVal) {}

LLVMBool LLVMIsThreadLocal(LLVMValueRef GlobalVar) {}

void LLVMSetThreadLocal(LLVMValueRef GlobalVar, LLVMBool IsThreadLocal) {}

LLVMBool LLVMIsGlobalConstant(LLVMValueRef GlobalVar) {}

void LLVMSetGlobalConstant(LLVMValueRef GlobalVar, LLVMBool IsConstant) {}

LLVMThreadLocalMode LLVMGetThreadLocalMode(LLVMValueRef GlobalVar) {}

void LLVMSetThreadLocalMode(LLVMValueRef GlobalVar, LLVMThreadLocalMode Mode) {}

LLVMBool LLVMIsExternallyInitialized(LLVMValueRef GlobalVar) {}

void LLVMSetExternallyInitialized(LLVMValueRef GlobalVar, LLVMBool IsExtInit) {}

/*--.. Operations on aliases ......................................--*/

LLVMValueRef LLVMAddAlias2(LLVMModuleRef M, LLVMTypeRef ValueTy,
                           unsigned AddrSpace, LLVMValueRef Aliasee,
                           const char *Name) {}

LLVMValueRef LLVMGetNamedGlobalAlias(LLVMModuleRef M,
                                     const char *Name, size_t NameLen) {}

LLVMValueRef LLVMGetFirstGlobalAlias(LLVMModuleRef M) {}

LLVMValueRef LLVMGetLastGlobalAlias(LLVMModuleRef M) {}

LLVMValueRef LLVMGetNextGlobalAlias(LLVMValueRef GA) {}

LLVMValueRef LLVMGetPreviousGlobalAlias(LLVMValueRef GA) {}

LLVMValueRef LLVMAliasGetAliasee(LLVMValueRef Alias) {}

void LLVMAliasSetAliasee(LLVMValueRef Alias, LLVMValueRef Aliasee) {}

/*--.. Operations on functions .............................................--*/

LLVMValueRef LLVMAddFunction(LLVMModuleRef M, const char *Name,
                             LLVMTypeRef FunctionTy) {}

LLVMValueRef LLVMGetNamedFunction(LLVMModuleRef M, const char *Name) {}

LLVMValueRef LLVMGetNamedFunctionWithLength(LLVMModuleRef M, const char *Name,
                                            size_t Length) {}

LLVMValueRef LLVMGetFirstFunction(LLVMModuleRef M) {}

LLVMValueRef LLVMGetLastFunction(LLVMModuleRef M) {}

LLVMValueRef LLVMGetNextFunction(LLVMValueRef Fn) {}

LLVMValueRef LLVMGetPreviousFunction(LLVMValueRef Fn) {}

void LLVMDeleteFunction(LLVMValueRef Fn) {}

LLVMBool LLVMHasPersonalityFn(LLVMValueRef Fn) {}

LLVMValueRef LLVMGetPersonalityFn(LLVMValueRef Fn) {}

void LLVMSetPersonalityFn(LLVMValueRef Fn, LLVMValueRef PersonalityFn) {}

unsigned LLVMGetIntrinsicID(LLVMValueRef Fn) {}

static Intrinsic::ID llvm_map_to_intrinsic_id(unsigned ID) {}

LLVMValueRef LLVMGetIntrinsicDeclaration(LLVMModuleRef Mod,
                                         unsigned ID,
                                         LLVMTypeRef *ParamTypes,
                                         size_t ParamCount) {}

const char *LLVMIntrinsicGetName(unsigned ID, size_t *NameLength) {}

LLVMTypeRef LLVMIntrinsicGetType(LLVMContextRef Ctx, unsigned ID,
                                 LLVMTypeRef *ParamTypes, size_t ParamCount) {}

const char *LLVMIntrinsicCopyOverloadedName(unsigned ID,
                                            LLVMTypeRef *ParamTypes,
                                            size_t ParamCount,
                                            size_t *NameLength) {}

const char *LLVMIntrinsicCopyOverloadedName2(LLVMModuleRef Mod, unsigned ID,
                                             LLVMTypeRef *ParamTypes,
                                             size_t ParamCount,
                                             size_t *NameLength) {}

unsigned LLVMLookupIntrinsicID(const char *Name, size_t NameLen) {}

LLVMBool LLVMIntrinsicIsOverloaded(unsigned ID) {}

unsigned LLVMGetFunctionCallConv(LLVMValueRef Fn) {}

void LLVMSetFunctionCallConv(LLVMValueRef Fn, unsigned CC) {}

const char *LLVMGetGC(LLVMValueRef Fn) {}

void LLVMSetGC(LLVMValueRef Fn, const char *GC) {}

LLVMValueRef LLVMGetPrefixData(LLVMValueRef Fn) {}

LLVMBool LLVMHasPrefixData(LLVMValueRef Fn) {}

void LLVMSetPrefixData(LLVMValueRef Fn, LLVMValueRef prefixData) {}

LLVMValueRef LLVMGetPrologueData(LLVMValueRef Fn) {}

LLVMBool LLVMHasPrologueData(LLVMValueRef Fn) {}

void LLVMSetPrologueData(LLVMValueRef Fn, LLVMValueRef prologueData) {}

void LLVMAddAttributeAtIndex(LLVMValueRef F, LLVMAttributeIndex Idx,
                             LLVMAttributeRef A) {}

unsigned LLVMGetAttributeCountAtIndex(LLVMValueRef F, LLVMAttributeIndex Idx) {}

void LLVMGetAttributesAtIndex(LLVMValueRef F, LLVMAttributeIndex Idx,
                              LLVMAttributeRef *Attrs) {}

LLVMAttributeRef LLVMGetEnumAttributeAtIndex(LLVMValueRef F,
                                             LLVMAttributeIndex Idx,
                                             unsigned KindID) {}

LLVMAttributeRef LLVMGetStringAttributeAtIndex(LLVMValueRef F,
                                               LLVMAttributeIndex Idx,
                                               const char *K, unsigned KLen) {}

void LLVMRemoveEnumAttributeAtIndex(LLVMValueRef F, LLVMAttributeIndex Idx,
                                    unsigned KindID) {}

void LLVMRemoveStringAttributeAtIndex(LLVMValueRef F, LLVMAttributeIndex Idx,
                                      const char *K, unsigned KLen) {}

void LLVMAddTargetDependentFunctionAttr(LLVMValueRef Fn, const char *A,
                                        const char *V) {}

/*--.. Operations on parameters ............................................--*/

unsigned LLVMCountParams(LLVMValueRef FnRef) {}

void LLVMGetParams(LLVMValueRef FnRef, LLVMValueRef *ParamRefs) {}

LLVMValueRef LLVMGetParam(LLVMValueRef FnRef, unsigned index) {}

LLVMValueRef LLVMGetParamParent(LLVMValueRef V) {}

LLVMValueRef LLVMGetFirstParam(LLVMValueRef Fn) {}

LLVMValueRef LLVMGetLastParam(LLVMValueRef Fn) {}

LLVMValueRef LLVMGetNextParam(LLVMValueRef Arg) {}

LLVMValueRef LLVMGetPreviousParam(LLVMValueRef Arg) {}

void LLVMSetParamAlignment(LLVMValueRef Arg, unsigned align) {}

/*--.. Operations on ifuncs ................................................--*/

LLVMValueRef LLVMAddGlobalIFunc(LLVMModuleRef M,
                                const char *Name, size_t NameLen,
                                LLVMTypeRef Ty, unsigned AddrSpace,
                                LLVMValueRef Resolver) {}

LLVMValueRef LLVMGetNamedGlobalIFunc(LLVMModuleRef M,
                                     const char *Name, size_t NameLen) {}

LLVMValueRef LLVMGetFirstGlobalIFunc(LLVMModuleRef M) {}

LLVMValueRef LLVMGetLastGlobalIFunc(LLVMModuleRef M) {}

LLVMValueRef LLVMGetNextGlobalIFunc(LLVMValueRef IFunc) {}

LLVMValueRef LLVMGetPreviousGlobalIFunc(LLVMValueRef IFunc) {}

LLVMValueRef LLVMGetGlobalIFuncResolver(LLVMValueRef IFunc) {}

void LLVMSetGlobalIFuncResolver(LLVMValueRef IFunc, LLVMValueRef Resolver) {}

void LLVMEraseGlobalIFunc(LLVMValueRef IFunc) {}

void LLVMRemoveGlobalIFunc(LLVMValueRef IFunc) {}

/*--.. Operations on operand bundles........................................--*/

LLVMOperandBundleRef LLVMCreateOperandBundle(const char *Tag, size_t TagLen,
                                             LLVMValueRef *Args,
                                             unsigned NumArgs) {}

void LLVMDisposeOperandBundle(LLVMOperandBundleRef Bundle) {}

const char *LLVMGetOperandBundleTag(LLVMOperandBundleRef Bundle, size_t *Len) {}

unsigned LLVMGetNumOperandBundleArgs(LLVMOperandBundleRef Bundle) {}

LLVMValueRef LLVMGetOperandBundleArgAtIndex(LLVMOperandBundleRef Bundle,
                                            unsigned Index) {}

/*--.. Operations on basic blocks ..........................................--*/

LLVMValueRef LLVMBasicBlockAsValue(LLVMBasicBlockRef BB) {}

LLVMBool LLVMValueIsBasicBlock(LLVMValueRef Val) {}

LLVMBasicBlockRef LLVMValueAsBasicBlock(LLVMValueRef Val) {}

const char *LLVMGetBasicBlockName(LLVMBasicBlockRef BB) {}

LLVMValueRef LLVMGetBasicBlockParent(LLVMBasicBlockRef BB) {}

LLVMValueRef LLVMGetBasicBlockTerminator(LLVMBasicBlockRef BB) {}

unsigned LLVMCountBasicBlocks(LLVMValueRef FnRef) {}

void LLVMGetBasicBlocks(LLVMValueRef FnRef, LLVMBasicBlockRef *BasicBlocksRefs){}

LLVMBasicBlockRef LLVMGetEntryBasicBlock(LLVMValueRef Fn) {}

LLVMBasicBlockRef LLVMGetFirstBasicBlock(LLVMValueRef Fn) {}

LLVMBasicBlockRef LLVMGetLastBasicBlock(LLVMValueRef Fn) {}

LLVMBasicBlockRef LLVMGetNextBasicBlock(LLVMBasicBlockRef BB) {}

LLVMBasicBlockRef LLVMGetPreviousBasicBlock(LLVMBasicBlockRef BB) {}

LLVMBasicBlockRef LLVMCreateBasicBlockInContext(LLVMContextRef C,
                                                const char *Name) {}

void LLVMInsertExistingBasicBlockAfterInsertBlock(LLVMBuilderRef Builder,
                                                  LLVMBasicBlockRef BB) {}

void LLVMAppendExistingBasicBlock(LLVMValueRef Fn,
                                  LLVMBasicBlockRef BB) {}

LLVMBasicBlockRef LLVMAppendBasicBlockInContext(LLVMContextRef C,
                                                LLVMValueRef FnRef,
                                                const char *Name) {}

LLVMBasicBlockRef LLVMAppendBasicBlock(LLVMValueRef FnRef, const char *Name) {}

LLVMBasicBlockRef LLVMInsertBasicBlockInContext(LLVMContextRef C,
                                                LLVMBasicBlockRef BBRef,
                                                const char *Name) {}

LLVMBasicBlockRef LLVMInsertBasicBlock(LLVMBasicBlockRef BBRef,
                                       const char *Name) {}

void LLVMDeleteBasicBlock(LLVMBasicBlockRef BBRef) {}

void LLVMRemoveBasicBlockFromParent(LLVMBasicBlockRef BBRef) {}

void LLVMMoveBasicBlockBefore(LLVMBasicBlockRef BB, LLVMBasicBlockRef MovePos) {}

void LLVMMoveBasicBlockAfter(LLVMBasicBlockRef BB, LLVMBasicBlockRef MovePos) {}

/*--.. Operations on instructions ..........................................--*/

LLVMBasicBlockRef LLVMGetInstructionParent(LLVMValueRef Inst) {}

LLVMValueRef LLVMGetFirstInstruction(LLVMBasicBlockRef BB) {}

LLVMValueRef LLVMGetLastInstruction(LLVMBasicBlockRef BB) {}

LLVMValueRef LLVMGetNextInstruction(LLVMValueRef Inst) {}

LLVMValueRef LLVMGetPreviousInstruction(LLVMValueRef Inst) {}

void LLVMInstructionRemoveFromParent(LLVMValueRef Inst) {}

void LLVMInstructionEraseFromParent(LLVMValueRef Inst) {}

void LLVMDeleteInstruction(LLVMValueRef Inst) {}

LLVMIntPredicate LLVMGetICmpPredicate(LLVMValueRef Inst) {}

LLVMRealPredicate LLVMGetFCmpPredicate(LLVMValueRef Inst) {}

LLVMOpcode LLVMGetInstructionOpcode(LLVMValueRef Inst) {}

LLVMValueRef LLVMInstructionClone(LLVMValueRef Inst) {}

LLVMValueRef LLVMIsATerminatorInst(LLVMValueRef Inst) {}

unsigned LLVMGetNumArgOperands(LLVMValueRef Instr) {}

/*--.. Call and invoke instructions ........................................--*/

unsigned LLVMGetInstructionCallConv(LLVMValueRef Instr) {}

void LLVMSetInstructionCallConv(LLVMValueRef Instr, unsigned CC) {}

void LLVMSetInstrParamAlignment(LLVMValueRef Instr, LLVMAttributeIndex Idx,
                                unsigned align) {}

void LLVMAddCallSiteAttribute(LLVMValueRef C, LLVMAttributeIndex Idx,
                              LLVMAttributeRef A) {}

unsigned LLVMGetCallSiteAttributeCount(LLVMValueRef C,
                                       LLVMAttributeIndex Idx) {}

void LLVMGetCallSiteAttributes(LLVMValueRef C, LLVMAttributeIndex Idx,
                               LLVMAttributeRef *Attrs) {}

LLVMAttributeRef LLVMGetCallSiteEnumAttribute(LLVMValueRef C,
                                              LLVMAttributeIndex Idx,
                                              unsigned KindID) {}

LLVMAttributeRef LLVMGetCallSiteStringAttribute(LLVMValueRef C,
                                                LLVMAttributeIndex Idx,
                                                const char *K, unsigned KLen) {}

void LLVMRemoveCallSiteEnumAttribute(LLVMValueRef C, LLVMAttributeIndex Idx,
                                     unsigned KindID) {}

void LLVMRemoveCallSiteStringAttribute(LLVMValueRef C, LLVMAttributeIndex Idx,
                                       const char *K, unsigned KLen) {}

LLVMValueRef LLVMGetCalledValue(LLVMValueRef Instr) {}

LLVMTypeRef LLVMGetCalledFunctionType(LLVMValueRef Instr) {}

unsigned LLVMGetNumOperandBundles(LLVMValueRef C) {}

LLVMOperandBundleRef LLVMGetOperandBundleAtIndex(LLVMValueRef C,
                                                 unsigned Index) {}

/*--.. Operations on call instructions (only) ..............................--*/

LLVMBool LLVMIsTailCall(LLVMValueRef Call) {}

void LLVMSetTailCall(LLVMValueRef Call, LLVMBool isTailCall) {}

LLVMTailCallKind LLVMGetTailCallKind(LLVMValueRef Call) {}

void LLVMSetTailCallKind(LLVMValueRef Call, LLVMTailCallKind kind) {}

/*--.. Operations on invoke instructions (only) ............................--*/

LLVMBasicBlockRef LLVMGetNormalDest(LLVMValueRef Invoke) {}

LLVMBasicBlockRef LLVMGetUnwindDest(LLVMValueRef Invoke) {}

void LLVMSetNormalDest(LLVMValueRef Invoke, LLVMBasicBlockRef B) {}

void LLVMSetUnwindDest(LLVMValueRef Invoke, LLVMBasicBlockRef B) {}

LLVMBasicBlockRef LLVMGetCallBrDefaultDest(LLVMValueRef CallBr) {}

unsigned LLVMGetCallBrNumIndirectDests(LLVMValueRef CallBr) {}

LLVMBasicBlockRef LLVMGetCallBrIndirectDest(LLVMValueRef CallBr, unsigned Idx) {}

/*--.. Operations on terminators ...........................................--*/

unsigned LLVMGetNumSuccessors(LLVMValueRef Term) {}

LLVMBasicBlockRef LLVMGetSuccessor(LLVMValueRef Term, unsigned i) {}

void LLVMSetSuccessor(LLVMValueRef Term, unsigned i, LLVMBasicBlockRef block) {}

/*--.. Operations on branch instructions (only) ............................--*/

LLVMBool LLVMIsConditional(LLVMValueRef Branch) {}

LLVMValueRef LLVMGetCondition(LLVMValueRef Branch) {}

void LLVMSetCondition(LLVMValueRef Branch, LLVMValueRef Cond) {}

/*--.. Operations on switch instructions (only) ............................--*/

LLVMBasicBlockRef LLVMGetSwitchDefaultDest(LLVMValueRef Switch) {}

/*--.. Operations on alloca instructions (only) ............................--*/

LLVMTypeRef LLVMGetAllocatedType(LLVMValueRef Alloca) {}

/*--.. Operations on gep instructions (only) ...............................--*/

LLVMBool LLVMIsInBounds(LLVMValueRef GEP) {}

void LLVMSetIsInBounds(LLVMValueRef GEP, LLVMBool InBounds) {}

LLVMTypeRef LLVMGetGEPSourceElementType(LLVMValueRef GEP) {}

LLVMGEPNoWrapFlags LLVMGEPGetNoWrapFlags(LLVMValueRef GEP) {}

void LLVMGEPSetNoWrapFlags(LLVMValueRef GEP, LLVMGEPNoWrapFlags NoWrapFlags) {}

/*--.. Operations on phi nodes .............................................--*/

void LLVMAddIncoming(LLVMValueRef PhiNode, LLVMValueRef *IncomingValues,
                     LLVMBasicBlockRef *IncomingBlocks, unsigned Count) {}

unsigned LLVMCountIncoming(LLVMValueRef PhiNode) {}

LLVMValueRef LLVMGetIncomingValue(LLVMValueRef PhiNode, unsigned Index) {}

LLVMBasicBlockRef LLVMGetIncomingBlock(LLVMValueRef PhiNode, unsigned Index) {}

/*--.. Operations on extractvalue and insertvalue nodes ....................--*/

unsigned LLVMGetNumIndices(LLVMValueRef Inst) {}

const unsigned *LLVMGetIndices(LLVMValueRef Inst) {}


/*===-- Instruction builders ----------------------------------------------===*/

LLVMBuilderRef LLVMCreateBuilderInContext(LLVMContextRef C) {}

LLVMBuilderRef LLVMCreateBuilder(void) {}

static void LLVMPositionBuilderImpl(IRBuilder<> *Builder, BasicBlock *Block,
                                    Instruction *Instr, bool BeforeDbgRecords) {}

void LLVMPositionBuilder(LLVMBuilderRef Builder, LLVMBasicBlockRef Block,
                         LLVMValueRef Instr) {}

void LLVMPositionBuilderBeforeDbgRecords(LLVMBuilderRef Builder,
                                         LLVMBasicBlockRef Block,
                                         LLVMValueRef Instr) {}

void LLVMPositionBuilderBefore(LLVMBuilderRef Builder, LLVMValueRef Instr) {}

void LLVMPositionBuilderBeforeInstrAndDbgRecords(LLVMBuilderRef Builder,
                                                 LLVMValueRef Instr) {}

void LLVMPositionBuilderAtEnd(LLVMBuilderRef Builder, LLVMBasicBlockRef Block) {}

LLVMBasicBlockRef LLVMGetInsertBlock(LLVMBuilderRef Builder) {}

void LLVMClearInsertionPosition(LLVMBuilderRef Builder) {}

void LLVMInsertIntoBuilder(LLVMBuilderRef Builder, LLVMValueRef Instr) {}

void LLVMInsertIntoBuilderWithName(LLVMBuilderRef Builder, LLVMValueRef Instr,
                                   const char *Name) {}

void LLVMDisposeBuilder(LLVMBuilderRef Builder) {}

/*--.. Metadata builders ...................................................--*/

LLVMMetadataRef LLVMGetCurrentDebugLocation2(LLVMBuilderRef Builder) {}

void LLVMSetCurrentDebugLocation2(LLVMBuilderRef Builder, LLVMMetadataRef Loc) {}

void LLVMSetCurrentDebugLocation(LLVMBuilderRef Builder, LLVMValueRef L) {}

LLVMValueRef LLVMGetCurrentDebugLocation(LLVMBuilderRef Builder) {}

void LLVMSetInstDebugLocation(LLVMBuilderRef Builder, LLVMValueRef Inst) {}

void LLVMAddMetadataToInst(LLVMBuilderRef Builder, LLVMValueRef Inst) {}

void LLVMBuilderSetDefaultFPMathTag(LLVMBuilderRef Builder,
                                    LLVMMetadataRef FPMathTag) {}

LLVMContextRef LLVMGetBuilderContext(LLVMBuilderRef Builder) {}

LLVMMetadataRef LLVMBuilderGetDefaultFPMathTag(LLVMBuilderRef Builder) {}

/*--.. Instruction builders ................................................--*/

LLVMValueRef LLVMBuildRetVoid(LLVMBuilderRef B) {}

LLVMValueRef LLVMBuildRet(LLVMBuilderRef B, LLVMValueRef V) {}

LLVMValueRef LLVMBuildAggregateRet(LLVMBuilderRef B, LLVMValueRef *RetVals,
                                   unsigned N) {}

LLVMValueRef LLVMBuildBr(LLVMBuilderRef B, LLVMBasicBlockRef Dest) {}

LLVMValueRef LLVMBuildCondBr(LLVMBuilderRef B, LLVMValueRef If,
                             LLVMBasicBlockRef Then, LLVMBasicBlockRef Else) {}

LLVMValueRef LLVMBuildSwitch(LLVMBuilderRef B, LLVMValueRef V,
                             LLVMBasicBlockRef Else, unsigned NumCases) {}

LLVMValueRef LLVMBuildIndirectBr(LLVMBuilderRef B, LLVMValueRef Addr,
                                 unsigned NumDests) {}

LLVMValueRef LLVMBuildCallBr(LLVMBuilderRef B, LLVMTypeRef Ty, LLVMValueRef Fn,
                             LLVMBasicBlockRef DefaultDest,
                             LLVMBasicBlockRef *IndirectDests,
                             unsigned NumIndirectDests, LLVMValueRef *Args,
                             unsigned NumArgs, LLVMOperandBundleRef *Bundles,
                             unsigned NumBundles, const char *Name) {}

LLVMValueRef LLVMBuildInvoke2(LLVMBuilderRef B, LLVMTypeRef Ty, LLVMValueRef Fn,
                              LLVMValueRef *Args, unsigned NumArgs,
                              LLVMBasicBlockRef Then, LLVMBasicBlockRef Catch,
                              const char *Name) {}

LLVMValueRef LLVMBuildInvokeWithOperandBundles(
    LLVMBuilderRef B, LLVMTypeRef Ty, LLVMValueRef Fn, LLVMValueRef *Args,
    unsigned NumArgs, LLVMBasicBlockRef Then, LLVMBasicBlockRef Catch,
    LLVMOperandBundleRef *Bundles, unsigned NumBundles, const char *Name) {}

LLVMValueRef LLVMBuildLandingPad(LLVMBuilderRef B, LLVMTypeRef Ty,
                                 LLVMValueRef PersFn, unsigned NumClauses,
                                 const char *Name) {}

LLVMValueRef LLVMBuildCatchPad(LLVMBuilderRef B, LLVMValueRef ParentPad,
                               LLVMValueRef *Args, unsigned NumArgs,
                               const char *Name) {}

LLVMValueRef LLVMBuildCleanupPad(LLVMBuilderRef B, LLVMValueRef ParentPad,
                                 LLVMValueRef *Args, unsigned NumArgs,
                                 const char *Name) {}

LLVMValueRef LLVMBuildResume(LLVMBuilderRef B, LLVMValueRef Exn) {}

LLVMValueRef LLVMBuildCatchSwitch(LLVMBuilderRef B, LLVMValueRef ParentPad,
                                  LLVMBasicBlockRef UnwindBB,
                                  unsigned NumHandlers, const char *Name) {}

LLVMValueRef LLVMBuildCatchRet(LLVMBuilderRef B, LLVMValueRef CatchPad,
                               LLVMBasicBlockRef BB) {}

LLVMValueRef LLVMBuildCleanupRet(LLVMBuilderRef B, LLVMValueRef CatchPad,
                                 LLVMBasicBlockRef BB) {}

LLVMValueRef LLVMBuildUnreachable(LLVMBuilderRef B) {}

void LLVMAddCase(LLVMValueRef Switch, LLVMValueRef OnVal,
                 LLVMBasicBlockRef Dest) {}

void LLVMAddDestination(LLVMValueRef IndirectBr, LLVMBasicBlockRef Dest) {}

unsigned LLVMGetNumClauses(LLVMValueRef LandingPad) {}

LLVMValueRef LLVMGetClause(LLVMValueRef LandingPad, unsigned Idx) {}

void LLVMAddClause(LLVMValueRef LandingPad, LLVMValueRef ClauseVal) {}

LLVMBool LLVMIsCleanup(LLVMValueRef LandingPad) {}

void LLVMSetCleanup(LLVMValueRef LandingPad, LLVMBool Val) {}

void LLVMAddHandler(LLVMValueRef CatchSwitch, LLVMBasicBlockRef Dest) {}

unsigned LLVMGetNumHandlers(LLVMValueRef CatchSwitch) {}

void LLVMGetHandlers(LLVMValueRef CatchSwitch, LLVMBasicBlockRef *Handlers) {}

LLVMValueRef LLVMGetParentCatchSwitch(LLVMValueRef CatchPad) {}

void LLVMSetParentCatchSwitch(LLVMValueRef CatchPad, LLVMValueRef CatchSwitch) {}

/*--.. Funclets ...........................................................--*/

LLVMValueRef LLVMGetArgOperand(LLVMValueRef Funclet, unsigned i) {}

void LLVMSetArgOperand(LLVMValueRef Funclet, unsigned i, LLVMValueRef value) {}

/*--.. Arithmetic ..........................................................--*/

static FastMathFlags mapFromLLVMFastMathFlags(LLVMFastMathFlags FMF) {}

static LLVMFastMathFlags mapToLLVMFastMathFlags(FastMathFlags FMF) {}

LLVMValueRef LLVMBuildAdd(LLVMBuilderRef B, LLVMValueRef LHS, LLVMValueRef RHS,
                          const char *Name) {}

LLVMValueRef LLVMBuildNSWAdd(LLVMBuilderRef B, LLVMValueRef LHS, LLVMValueRef RHS,
                          const char *Name) {}

LLVMValueRef LLVMBuildNUWAdd(LLVMBuilderRef B, LLVMValueRef LHS, LLVMValueRef RHS,
                          const char *Name) {}

LLVMValueRef LLVMBuildFAdd(LLVMBuilderRef B, LLVMValueRef LHS, LLVMValueRef RHS,
                          const char *Name) {}

LLVMValueRef LLVMBuildSub(LLVMBuilderRef B, LLVMValueRef LHS, LLVMValueRef RHS,
                          const char *Name) {}

LLVMValueRef LLVMBuildNSWSub(LLVMBuilderRef B, LLVMValueRef LHS, LLVMValueRef RHS,
                          const char *Name) {}

LLVMValueRef LLVMBuildNUWSub(LLVMBuilderRef B, LLVMValueRef LHS, LLVMValueRef RHS,
                          const char *Name) {}

LLVMValueRef LLVMBuildFSub(LLVMBuilderRef B, LLVMValueRef LHS, LLVMValueRef RHS,
                          const char *Name) {}

LLVMValueRef LLVMBuildMul(LLVMBuilderRef B, LLVMValueRef LHS, LLVMValueRef RHS,
                          const char *Name) {}

LLVMValueRef LLVMBuildNSWMul(LLVMBuilderRef B, LLVMValueRef LHS, LLVMValueRef RHS,
                          const char *Name) {}

LLVMValueRef LLVMBuildNUWMul(LLVMBuilderRef B, LLVMValueRef LHS, LLVMValueRef RHS,
                          const char *Name) {}

LLVMValueRef LLVMBuildFMul(LLVMBuilderRef B, LLVMValueRef LHS, LLVMValueRef RHS,
                          const char *Name) {}

LLVMValueRef LLVMBuildUDiv(LLVMBuilderRef B, LLVMValueRef LHS, LLVMValueRef RHS,
                           const char *Name) {}

LLVMValueRef LLVMBuildExactUDiv(LLVMBuilderRef B, LLVMValueRef LHS,
                                LLVMValueRef RHS, const char *Name) {}

LLVMValueRef LLVMBuildSDiv(LLVMBuilderRef B, LLVMValueRef LHS, LLVMValueRef RHS,
                           const char *Name) {}

LLVMValueRef LLVMBuildExactSDiv(LLVMBuilderRef B, LLVMValueRef LHS,
                                LLVMValueRef RHS, const char *Name) {}

LLVMValueRef LLVMBuildFDiv(LLVMBuilderRef B, LLVMValueRef LHS, LLVMValueRef RHS,
                           const char *Name) {}

LLVMValueRef LLVMBuildURem(LLVMBuilderRef B, LLVMValueRef LHS, LLVMValueRef RHS,
                           const char *Name) {}

LLVMValueRef LLVMBuildSRem(LLVMBuilderRef B, LLVMValueRef LHS, LLVMValueRef RHS,
                           const char *Name) {}

LLVMValueRef LLVMBuildFRem(LLVMBuilderRef B, LLVMValueRef LHS, LLVMValueRef RHS,
                           const char *Name) {}

LLVMValueRef LLVMBuildShl(LLVMBuilderRef B, LLVMValueRef LHS, LLVMValueRef RHS,
                          const char *Name) {}

LLVMValueRef LLVMBuildLShr(LLVMBuilderRef B, LLVMValueRef LHS, LLVMValueRef RHS,
                           const char *Name) {}

LLVMValueRef LLVMBuildAShr(LLVMBuilderRef B, LLVMValueRef LHS, LLVMValueRef RHS,
                           const char *Name) {}

LLVMValueRef LLVMBuildAnd(LLVMBuilderRef B, LLVMValueRef LHS, LLVMValueRef RHS,
                          const char *Name) {}

LLVMValueRef LLVMBuildOr(LLVMBuilderRef B, LLVMValueRef LHS, LLVMValueRef RHS,
                         const char *Name) {}

LLVMValueRef LLVMBuildXor(LLVMBuilderRef B, LLVMValueRef LHS, LLVMValueRef RHS,
                          const char *Name) {}

LLVMValueRef LLVMBuildBinOp(LLVMBuilderRef B, LLVMOpcode Op,
                            LLVMValueRef LHS, LLVMValueRef RHS,
                            const char *Name) {}

LLVMValueRef LLVMBuildNeg(LLVMBuilderRef B, LLVMValueRef V, const char *Name) {}

LLVMValueRef LLVMBuildNSWNeg(LLVMBuilderRef B, LLVMValueRef V,
                             const char *Name) {}

LLVMValueRef LLVMBuildNUWNeg(LLVMBuilderRef B, LLVMValueRef V,
                             const char *Name) {}

LLVMValueRef LLVMBuildFNeg(LLVMBuilderRef B, LLVMValueRef V, const char *Name) {}

LLVMValueRef LLVMBuildNot(LLVMBuilderRef B, LLVMValueRef V, const char *Name) {}

LLVMBool LLVMGetNUW(LLVMValueRef ArithInst) {}

void LLVMSetNUW(LLVMValueRef ArithInst, LLVMBool HasNUW) {}

LLVMBool LLVMGetNSW(LLVMValueRef ArithInst) {}

void LLVMSetNSW(LLVMValueRef ArithInst, LLVMBool HasNSW) {}

LLVMBool LLVMGetExact(LLVMValueRef DivOrShrInst) {}

void LLVMSetExact(LLVMValueRef DivOrShrInst, LLVMBool IsExact) {}

LLVMBool LLVMGetNNeg(LLVMValueRef NonNegInst) {}

void LLVMSetNNeg(LLVMValueRef NonNegInst, LLVMBool IsNonNeg) {}

LLVMFastMathFlags LLVMGetFastMathFlags(LLVMValueRef FPMathInst) {}

void LLVMSetFastMathFlags(LLVMValueRef FPMathInst, LLVMFastMathFlags FMF) {}

LLVMBool LLVMCanValueUseFastMathFlags(LLVMValueRef V) {}

LLVMBool LLVMGetIsDisjoint(LLVMValueRef Inst) {}

void LLVMSetIsDisjoint(LLVMValueRef Inst, LLVMBool IsDisjoint) {}

/*--.. Memory ..............................................................--*/

LLVMValueRef LLVMBuildMalloc(LLVMBuilderRef B, LLVMTypeRef Ty,
                             const char *Name) {}

LLVMValueRef LLVMBuildArrayMalloc(LLVMBuilderRef B, LLVMTypeRef Ty,
                                  LLVMValueRef Val, const char *Name) {}

LLVMValueRef LLVMBuildMemSet(LLVMBuilderRef B, LLVMValueRef Ptr,
                             LLVMValueRef Val, LLVMValueRef Len,
                             unsigned Align) {}

LLVMValueRef LLVMBuildMemCpy(LLVMBuilderRef B,
                             LLVMValueRef Dst, unsigned DstAlign,
                             LLVMValueRef Src, unsigned SrcAlign,
                             LLVMValueRef Size) {}

LLVMValueRef LLVMBuildMemMove(LLVMBuilderRef B,
                              LLVMValueRef Dst, unsigned DstAlign,
                              LLVMValueRef Src, unsigned SrcAlign,
                              LLVMValueRef Size) {}

LLVMValueRef LLVMBuildAlloca(LLVMBuilderRef B, LLVMTypeRef Ty,
                             const char *Name) {}

LLVMValueRef LLVMBuildArrayAlloca(LLVMBuilderRef B, LLVMTypeRef Ty,
                                  LLVMValueRef Val, const char *Name) {}

LLVMValueRef LLVMBuildFree(LLVMBuilderRef B, LLVMValueRef PointerVal) {}

LLVMValueRef LLVMBuildLoad2(LLVMBuilderRef B, LLVMTypeRef Ty,
                            LLVMValueRef PointerVal, const char *Name) {}

LLVMValueRef LLVMBuildStore(LLVMBuilderRef B, LLVMValueRef Val,
                            LLVMValueRef PointerVal) {}

static AtomicOrdering mapFromLLVMOrdering(LLVMAtomicOrdering Ordering) {}

static LLVMAtomicOrdering mapToLLVMOrdering(AtomicOrdering Ordering) {}

static AtomicRMWInst::BinOp mapFromLLVMRMWBinOp(LLVMAtomicRMWBinOp BinOp) {}

static LLVMAtomicRMWBinOp mapToLLVMRMWBinOp(AtomicRMWInst::BinOp BinOp) {}

LLVMValueRef LLVMBuildFence(LLVMBuilderRef B, LLVMAtomicOrdering Ordering,
                            LLVMBool isSingleThread, const char *Name) {}

LLVMValueRef LLVMBuildFenceSyncScope(LLVMBuilderRef B,
                                     LLVMAtomicOrdering Ordering, unsigned SSID,
                                     const char *Name) {}

LLVMValueRef LLVMBuildGEP2(LLVMBuilderRef B, LLVMTypeRef Ty,
                           LLVMValueRef Pointer, LLVMValueRef *Indices,
                           unsigned NumIndices, const char *Name) {}

LLVMValueRef LLVMBuildInBoundsGEP2(LLVMBuilderRef B, LLVMTypeRef Ty,
                                   LLVMValueRef Pointer, LLVMValueRef *Indices,
                                   unsigned NumIndices, const char *Name) {}

LLVMValueRef LLVMBuildGEPWithNoWrapFlags(LLVMBuilderRef B, LLVMTypeRef Ty,
                                         LLVMValueRef Pointer,
                                         LLVMValueRef *Indices,
                                         unsigned NumIndices, const char *Name,
                                         LLVMGEPNoWrapFlags NoWrapFlags) {}

LLVMValueRef LLVMBuildStructGEP2(LLVMBuilderRef B, LLVMTypeRef Ty,
                                 LLVMValueRef Pointer, unsigned Idx,
                                 const char *Name) {}

LLVMValueRef LLVMBuildGlobalString(LLVMBuilderRef B, const char *Str,
                                   const char *Name) {}

LLVMValueRef LLVMBuildGlobalStringPtr(LLVMBuilderRef B, const char *Str,
                                      const char *Name) {}

LLVMBool LLVMGetVolatile(LLVMValueRef MemAccessInst) {}

void LLVMSetVolatile(LLVMValueRef MemAccessInst, LLVMBool isVolatile) {}

LLVMBool LLVMGetWeak(LLVMValueRef CmpXchgInst) {}

void LLVMSetWeak(LLVMValueRef CmpXchgInst, LLVMBool isWeak) {}

LLVMAtomicOrdering LLVMGetOrdering(LLVMValueRef MemAccessInst) {}

void LLVMSetOrdering(LLVMValueRef MemAccessInst, LLVMAtomicOrdering Ordering) {}

LLVMAtomicRMWBinOp LLVMGetAtomicRMWBinOp(LLVMValueRef Inst) {}

void LLVMSetAtomicRMWBinOp(LLVMValueRef Inst, LLVMAtomicRMWBinOp BinOp) {}

/*--.. Casts ...............................................................--*/

LLVMValueRef LLVMBuildTrunc(LLVMBuilderRef B, LLVMValueRef Val,
                            LLVMTypeRef DestTy, const char *Name) {}

LLVMValueRef LLVMBuildZExt(LLVMBuilderRef B, LLVMValueRef Val,
                           LLVMTypeRef DestTy, const char *Name) {}

LLVMValueRef LLVMBuildSExt(LLVMBuilderRef B, LLVMValueRef Val,
                           LLVMTypeRef DestTy, const char *Name) {}

LLVMValueRef LLVMBuildFPToUI(LLVMBuilderRef B, LLVMValueRef Val,
                             LLVMTypeRef DestTy, const char *Name) {}

LLVMValueRef LLVMBuildFPToSI(LLVMBuilderRef B, LLVMValueRef Val,
                             LLVMTypeRef DestTy, const char *Name) {}

LLVMValueRef LLVMBuildUIToFP(LLVMBuilderRef B, LLVMValueRef Val,
                             LLVMTypeRef DestTy, const char *Name) {}

LLVMValueRef LLVMBuildSIToFP(LLVMBuilderRef B, LLVMValueRef Val,
                             LLVMTypeRef DestTy, const char *Name) {}

LLVMValueRef LLVMBuildFPTrunc(LLVMBuilderRef B, LLVMValueRef Val,
                              LLVMTypeRef DestTy, const char *Name) {}

LLVMValueRef LLVMBuildFPExt(LLVMBuilderRef B, LLVMValueRef Val,
                            LLVMTypeRef DestTy, const char *Name) {}

LLVMValueRef LLVMBuildPtrToInt(LLVMBuilderRef B, LLVMValueRef Val,
                               LLVMTypeRef DestTy, const char *Name) {}

LLVMValueRef LLVMBuildIntToPtr(LLVMBuilderRef B, LLVMValueRef Val,
                               LLVMTypeRef DestTy, const char *Name) {}

LLVMValueRef LLVMBuildBitCast(LLVMBuilderRef B, LLVMValueRef Val,
                              LLVMTypeRef DestTy, const char *Name) {}

LLVMValueRef LLVMBuildAddrSpaceCast(LLVMBuilderRef B, LLVMValueRef Val,
                                    LLVMTypeRef DestTy, const char *Name) {}

LLVMValueRef LLVMBuildZExtOrBitCast(LLVMBuilderRef B, LLVMValueRef Val,
                                    LLVMTypeRef DestTy, const char *Name) {}

LLVMValueRef LLVMBuildSExtOrBitCast(LLVMBuilderRef B, LLVMValueRef Val,
                                    LLVMTypeRef DestTy, const char *Name) {}

LLVMValueRef LLVMBuildTruncOrBitCast(LLVMBuilderRef B, LLVMValueRef Val,
                                     LLVMTypeRef DestTy, const char *Name) {}

LLVMValueRef LLVMBuildCast(LLVMBuilderRef B, LLVMOpcode Op, LLVMValueRef Val,
                           LLVMTypeRef DestTy, const char *Name) {}

LLVMValueRef LLVMBuildPointerCast(LLVMBuilderRef B, LLVMValueRef Val,
                                  LLVMTypeRef DestTy, const char *Name) {}

LLVMValueRef LLVMBuildIntCast2(LLVMBuilderRef B, LLVMValueRef Val,
                               LLVMTypeRef DestTy, LLVMBool IsSigned,
                               const char *Name) {}

LLVMValueRef LLVMBuildIntCast(LLVMBuilderRef B, LLVMValueRef Val,
                              LLVMTypeRef DestTy, const char *Name) {}

LLVMValueRef LLVMBuildFPCast(LLVMBuilderRef B, LLVMValueRef Val,
                             LLVMTypeRef DestTy, const char *Name) {}

LLVMOpcode LLVMGetCastOpcode(LLVMValueRef Src, LLVMBool SrcIsSigned,
                             LLVMTypeRef DestTy, LLVMBool DestIsSigned) {}

/*--.. Comparisons .........................................................--*/

LLVMValueRef LLVMBuildICmp(LLVMBuilderRef B, LLVMIntPredicate Op,
                           LLVMValueRef LHS, LLVMValueRef RHS,
                           const char *Name) {}

LLVMValueRef LLVMBuildFCmp(LLVMBuilderRef B, LLVMRealPredicate Op,
                           LLVMValueRef LHS, LLVMValueRef RHS,
                           const char *Name) {}

/*--.. Miscellaneous instructions ..........................................--*/

LLVMValueRef LLVMBuildPhi(LLVMBuilderRef B, LLVMTypeRef Ty, const char *Name) {}

LLVMValueRef LLVMBuildCall2(LLVMBuilderRef B, LLVMTypeRef Ty, LLVMValueRef Fn,
                            LLVMValueRef *Args, unsigned NumArgs,
                            const char *Name) {}

LLVMValueRef
LLVMBuildCallWithOperandBundles(LLVMBuilderRef B, LLVMTypeRef Ty,
                                LLVMValueRef Fn, LLVMValueRef *Args,
                                unsigned NumArgs, LLVMOperandBundleRef *Bundles,
                                unsigned NumBundles, const char *Name) {}

LLVMValueRef LLVMBuildSelect(LLVMBuilderRef B, LLVMValueRef If,
                             LLVMValueRef Then, LLVMValueRef Else,
                             const char *Name) {}

LLVMValueRef LLVMBuildVAArg(LLVMBuilderRef B, LLVMValueRef List,
                            LLVMTypeRef Ty, const char *Name) {}

LLVMValueRef LLVMBuildExtractElement(LLVMBuilderRef B, LLVMValueRef VecVal,
                                      LLVMValueRef Index, const char *Name) {}

LLVMValueRef LLVMBuildInsertElement(LLVMBuilderRef B, LLVMValueRef VecVal,
                                    LLVMValueRef EltVal, LLVMValueRef Index,
                                    const char *Name) {}

LLVMValueRef LLVMBuildShuffleVector(LLVMBuilderRef B, LLVMValueRef V1,
                                    LLVMValueRef V2, LLVMValueRef Mask,
                                    const char *Name) {}

LLVMValueRef LLVMBuildExtractValue(LLVMBuilderRef B, LLVMValueRef AggVal,
                                   unsigned Index, const char *Name) {}

LLVMValueRef LLVMBuildInsertValue(LLVMBuilderRef B, LLVMValueRef AggVal,
                                  LLVMValueRef EltVal, unsigned Index,
                                  const char *Name) {}

LLVMValueRef LLVMBuildFreeze(LLVMBuilderRef B, LLVMValueRef Val,
                             const char *Name) {}

LLVMValueRef LLVMBuildIsNull(LLVMBuilderRef B, LLVMValueRef Val,
                             const char *Name) {}

LLVMValueRef LLVMBuildIsNotNull(LLVMBuilderRef B, LLVMValueRef Val,
                                const char *Name) {}

LLVMValueRef LLVMBuildPtrDiff2(LLVMBuilderRef B, LLVMTypeRef ElemTy,
                               LLVMValueRef LHS, LLVMValueRef RHS,
                               const char *Name) {}

LLVMValueRef LLVMBuildAtomicRMW(LLVMBuilderRef B,LLVMAtomicRMWBinOp op,
                               LLVMValueRef PTR, LLVMValueRef Val,
                               LLVMAtomicOrdering ordering,
                               LLVMBool singleThread) {}

LLVMValueRef LLVMBuildAtomicRMWSyncScope(LLVMBuilderRef B,
                                         LLVMAtomicRMWBinOp op,
                                         LLVMValueRef PTR, LLVMValueRef Val,
                                         LLVMAtomicOrdering ordering,
                                         unsigned SSID) {}

LLVMValueRef LLVMBuildAtomicCmpXchg(LLVMBuilderRef B, LLVMValueRef Ptr,
                                    LLVMValueRef Cmp, LLVMValueRef New,
                                    LLVMAtomicOrdering SuccessOrdering,
                                    LLVMAtomicOrdering FailureOrdering,
                                    LLVMBool singleThread) {}

LLVMValueRef LLVMBuildAtomicCmpXchgSyncScope(LLVMBuilderRef B, LLVMValueRef Ptr,
                                             LLVMValueRef Cmp, LLVMValueRef New,
                                             LLVMAtomicOrdering SuccessOrdering,
                                             LLVMAtomicOrdering FailureOrdering,
                                             unsigned SSID) {}

unsigned LLVMGetNumMaskElements(LLVMValueRef SVInst) {}

int LLVMGetMaskValue(LLVMValueRef SVInst, unsigned Elt) {}

int LLVMGetUndefMaskElem(void) {}

LLVMBool LLVMIsAtomic(LLVMValueRef Inst) {}

LLVMBool LLVMIsAtomicSingleThread(LLVMValueRef AtomicInst) {}

void LLVMSetAtomicSingleThread(LLVMValueRef AtomicInst, LLVMBool NewValue) {}

unsigned LLVMGetAtomicSyncScopeID(LLVMValueRef AtomicInst) {}

void LLVMSetAtomicSyncScopeID(LLVMValueRef AtomicInst, unsigned SSID) {}

LLVMAtomicOrdering LLVMGetCmpXchgSuccessOrdering(LLVMValueRef CmpXchgInst)  {}

void LLVMSetCmpXchgSuccessOrdering(LLVMValueRef CmpXchgInst,
                                   LLVMAtomicOrdering Ordering) {}

LLVMAtomicOrdering LLVMGetCmpXchgFailureOrdering(LLVMValueRef CmpXchgInst)  {}

void LLVMSetCmpXchgFailureOrdering(LLVMValueRef CmpXchgInst,
                                   LLVMAtomicOrdering Ordering) {}

/*===-- Module providers --------------------------------------------------===*/

LLVMModuleProviderRef
LLVMCreateModuleProviderForExistingModule(LLVMModuleRef M) {}

void LLVMDisposeModuleProvider(LLVMModuleProviderRef MP) {}


/*===-- Memory buffers ----------------------------------------------------===*/

LLVMBool LLVMCreateMemoryBufferWithContentsOfFile(
    const char *Path,
    LLVMMemoryBufferRef *OutMemBuf,
    char **OutMessage) {}

LLVMBool LLVMCreateMemoryBufferWithSTDIN(LLVMMemoryBufferRef *OutMemBuf,
                                         char **OutMessage) {}

LLVMMemoryBufferRef LLVMCreateMemoryBufferWithMemoryRange(
    const char *InputData,
    size_t InputDataLength,
    const char *BufferName,
    LLVMBool RequiresNullTerminator) {}

LLVMMemoryBufferRef LLVMCreateMemoryBufferWithMemoryRangeCopy(
    const char *InputData,
    size_t InputDataLength,
    const char *BufferName) {}

const char *LLVMGetBufferStart(LLVMMemoryBufferRef MemBuf) {}

size_t LLVMGetBufferSize(LLVMMemoryBufferRef MemBuf) {}

void LLVMDisposeMemoryBuffer(LLVMMemoryBufferRef MemBuf) {}

/*===-- Pass Manager ------------------------------------------------------===*/

LLVMPassManagerRef LLVMCreatePassManager() {}

LLVMPassManagerRef LLVMCreateFunctionPassManagerForModule(LLVMModuleRef M) {}

LLVMPassManagerRef LLVMCreateFunctionPassManager(LLVMModuleProviderRef P) {}

LLVMBool LLVMRunPassManager(LLVMPassManagerRef PM, LLVMModuleRef M) {}

LLVMBool LLVMInitializeFunctionPassManager(LLVMPassManagerRef FPM) {}

LLVMBool LLVMRunFunctionPassManager(LLVMPassManagerRef FPM, LLVMValueRef F) {}

LLVMBool LLVMFinalizeFunctionPassManager(LLVMPassManagerRef FPM) {}

void LLVMDisposePassManager(LLVMPassManagerRef PM) {}

/*===-- Threading ------------------------------------------------------===*/

LLVMBool LLVMStartMultithreaded() {}

void LLVMStopMultithreaded() {}

LLVMBool LLVMIsMultithreaded() {}