LLVM  mainline
Defines | Functions
Core.cpp File Reference
#include "llvm-c/Core.h"
#include "llvm/Bitcode/ReaderWriter.h"
#include "llvm/IR/Attributes.h"
#include "llvm/IR/CallSite.h"
#include "llvm/IR/Constants.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/IntrinsicInst.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/LegacyPassManager.h"
#include "llvm/IR/Module.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/ManagedStatic.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>
#include "llvm/IR/Instruction.def"
Include dependency graph for Core.cpp:

Go to the source code of this file.

Defines

#define DEBUG_TYPE   "ir"
#define LLVM_DEFINE_VALUE_CAST(name)
#define HANDLE_INST(num, opc, clas)   case num: return LLVM##opc;
#define HANDLE_INST(num, opc, clas)   case LLVM##opc: return num;

Functions

void LLVMInitializeCore (LLVMPassRegistryRef R)
void LLVMShutdown ()
 Deallocate and destroy all ManagedStatic variables.
char * LLVMCreateMessage (const char *Message)
void LLVMDisposeMessage (char *Message)
LLVMContextRef LLVMContextCreate ()
 Create a new context.
LLVMContextRef LLVMGetGlobalContext ()
 Obtain the global context instance.
void LLVMContextSetDiagnosticHandler (LLVMContextRef C, LLVMDiagnosticHandler Handler, void *DiagnosticContext)
 Set the diagnostic handler for this context.
void LLVMContextSetYieldCallback (LLVMContextRef C, LLVMYieldCallback Callback, void *OpaqueHandle)
 Set the yield callback function for this context.
void LLVMContextDispose (LLVMContextRef C)
 Destroy a context instance.
unsigned LLVMGetMDKindIDInContext (LLVMContextRef C, const char *Name, unsigned SLen)
unsigned LLVMGetMDKindID (const char *Name, unsigned SLen)
char * LLVMGetDiagInfoDescription (LLVMDiagnosticInfoRef DI)
 Return a string representation of the DiagnosticInfo.
LLVMDiagnosticSeverity LLVMGetDiagInfoSeverity (LLVMDiagnosticInfoRef DI)
 Return an enum LLVMDiagnosticSeverity.
LLVMModuleRef LLVMModuleCreateWithName (const char *ModuleID)
 Create a new, empty module in the global context.
LLVMModuleRef LLVMModuleCreateWithNameInContext (const char *ModuleID, LLVMContextRef C)
 Create a new, empty module in a specific context.
void LLVMDisposeModule (LLVMModuleRef M)
 Destroy a module instance.
const char * LLVMGetDataLayout (LLVMModuleRef M)
 Obtain the data layout for a module.
void LLVMSetDataLayout (LLVMModuleRef M, const char *Triple)
 Set the data layout for a module.
const char * LLVMGetTarget (LLVMModuleRef M)
 Obtain the target triple for a module.
void LLVMSetTarget (LLVMModuleRef M, const char *Triple)
 Set the target triple for a module.
void LLVMDumpModule (LLVMModuleRef M)
 Dump a representation of a module to stderr.
LLVMBool LLVMPrintModuleToFile (LLVMModuleRef M, const char *Filename, char **ErrorMessage)
 Print a representation of a module to a file.
char * LLVMPrintModuleToString (LLVMModuleRef M)
 Return a string representation of the module.
void LLVMSetModuleInlineAsm (LLVMModuleRef M, const char *Asm)
 Set inline assembly for a module.
LLVMContextRef LLVMGetModuleContext (LLVMModuleRef M)
 Obtain the context to which this module is associated.
LLVMTypeKind LLVMGetTypeKind (LLVMTypeRef Ty)
 Obtain the enumerated type of a Type instance.
LLVMBool LLVMTypeIsSized (LLVMTypeRef Ty)
 Whether the type has a known size.
LLVMContextRef LLVMGetTypeContext (LLVMTypeRef Ty)
 Obtain the context to which this type instance is associated.
void LLVMDumpType (LLVMTypeRef Ty)
 Dump a representation of a type to stderr.
char * LLVMPrintTypeToString (LLVMTypeRef Ty)
 Return a string representation of the type.
LLVMTypeRef LLVMInt1TypeInContext (LLVMContextRef C)
 Obtain an integer type from a context with specified bit width.
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)
 Obtain an integer type from the global context with a specified bit width.
LLVMTypeRef LLVMInt8Type (void)
LLVMTypeRef LLVMInt16Type (void)
LLVMTypeRef LLVMInt32Type (void)
LLVMTypeRef LLVMInt64Type (void)
LLVMTypeRef LLVMInt128Type (void)
LLVMTypeRef LLVMIntType (unsigned NumBits)
unsigned LLVMGetIntTypeWidth (LLVMTypeRef IntegerTy)
LLVMTypeRef LLVMHalfTypeInContext (LLVMContextRef C)
 Obtain a 16-bit floating point type from a context.
LLVMTypeRef LLVMFloatTypeInContext (LLVMContextRef C)
 Obtain a 32-bit floating point type from a context.
LLVMTypeRef LLVMDoubleTypeInContext (LLVMContextRef C)
 Obtain a 64-bit floating point type from a context.
LLVMTypeRef LLVMX86FP80TypeInContext (LLVMContextRef C)
 Obtain a 80-bit floating point type (X87) from a context.
LLVMTypeRef LLVMFP128TypeInContext (LLVMContextRef C)
 Obtain a 128-bit floating point type (112-bit mantissa) from a context.
LLVMTypeRef LLVMPPCFP128TypeInContext (LLVMContextRef C)
 Obtain a 128-bit floating point type (two 64-bits) from a context.
LLVMTypeRef LLVMX86MMXTypeInContext (LLVMContextRef C)
 Create a X86 MMX type in a context.
LLVMTypeRef LLVMHalfType (void)
 Obtain a floating point type from the global context.
LLVMTypeRef LLVMFloatType (void)
LLVMTypeRef LLVMDoubleType (void)
LLVMTypeRef LLVMX86FP80Type (void)
LLVMTypeRef LLVMFP128Type (void)
LLVMTypeRef LLVMPPCFP128Type (void)
LLVMTypeRef LLVMX86MMXType (void)
LLVMTypeRef LLVMFunctionType (LLVMTypeRef ReturnType, LLVMTypeRef *ParamTypes, unsigned ParamCount, LLVMBool IsVarArg)
 Obtain a function type consisting of a specified signature.
LLVMBool LLVMIsFunctionVarArg (LLVMTypeRef FunctionTy)
 Returns whether a function type is variadic.
LLVMTypeRef LLVMGetReturnType (LLVMTypeRef FunctionTy)
 Obtain the Type this function Type returns.
unsigned LLVMCountParamTypes (LLVMTypeRef FunctionTy)
 Obtain the number of parameters this function accepts.
void LLVMGetParamTypes (LLVMTypeRef FunctionTy, LLVMTypeRef *Dest)
 Obtain the types of a function's parameters.
LLVMTypeRef LLVMStructTypeInContext (LLVMContextRef C, LLVMTypeRef *ElementTypes, unsigned ElementCount, LLVMBool Packed)
 Create a new structure type in a context.
LLVMTypeRef LLVMStructType (LLVMTypeRef *ElementTypes, unsigned ElementCount, LLVMBool Packed)
 Create a new structure type in the global context.
LLVMTypeRef LLVMStructCreateNamed (LLVMContextRef C, const char *Name)
 Create an empty structure in a context having a specified name.
const char * LLVMGetStructName (LLVMTypeRef Ty)
 Obtain the name of a structure.
void LLVMStructSetBody (LLVMTypeRef StructTy, LLVMTypeRef *ElementTypes, unsigned ElementCount, LLVMBool Packed)
 Set the contents of a structure type.
unsigned LLVMCountStructElementTypes (LLVMTypeRef StructTy)
 Get the number of elements defined inside the structure.
void LLVMGetStructElementTypes (LLVMTypeRef StructTy, LLVMTypeRef *Dest)
 Get the elements within a structure.
LLVMTypeRef LLVMStructGetTypeAtIndex (LLVMTypeRef StructTy, unsigned i)
 Get the type of the element at a given index in the structure.
LLVMBool LLVMIsPackedStruct (LLVMTypeRef StructTy)
 Determine whether a structure is packed.
LLVMBool LLVMIsOpaqueStruct (LLVMTypeRef StructTy)
 Determine whether a structure is opaque.
LLVMTypeRef LLVMGetTypeByName (LLVMModuleRef M, const char *Name)
 Obtain a Type from a module by its registered name.
LLVMTypeRef LLVMArrayType (LLVMTypeRef ElementType, unsigned ElementCount)
 Create a fixed size array type that refers to a specific type.
LLVMTypeRef LLVMPointerType (LLVMTypeRef ElementType, unsigned AddressSpace)
 Create a pointer type that points to a defined type.
LLVMTypeRef LLVMVectorType (LLVMTypeRef ElementType, unsigned ElementCount)
 Create a vector type that contains a defined type and has a specific number of elements.
LLVMTypeRef LLVMGetElementType (LLVMTypeRef Ty)
 Obtain the type of elements within a sequential type.
unsigned LLVMGetArrayLength (LLVMTypeRef ArrayTy)
 Obtain the length of an array type.
unsigned LLVMGetPointerAddressSpace (LLVMTypeRef PointerTy)
 Obtain the address space of a pointer type.
unsigned LLVMGetVectorSize (LLVMTypeRef VectorTy)
 Obtain the number of elements in a vector type.
LLVMTypeRef LLVMVoidTypeInContext (LLVMContextRef C)
 Create a void type in a context.
LLVMTypeRef LLVMLabelTypeInContext (LLVMContextRef C)
 Create a label type in a context.
LLVMTypeRef LLVMVoidType (void)
 These are similar to the above functions except they operate on the global context.
LLVMTypeRef LLVMLabelType (void)
LLVMTypeRef LLVMTypeOf (LLVMValueRef Val)
 Obtain the type of a value.
const char * LLVMGetValueName (LLVMValueRef Val)
 Obtain the string name of a value.
void LLVMSetValueName (LLVMValueRef Val, const char *Name)
 Set the string name of a value.
void LLVMDumpValue (LLVMValueRef Val)
 Dump a representation of a value to stderr.
char * LLVMPrintValueToString (LLVMValueRef Val)
 Return a string representation of the value.
void LLVMReplaceAllUsesWith (LLVMValueRef OldVal, LLVMValueRef NewVal)
 Replace all uses of a value with another one.
int LLVMHasMetadata (LLVMValueRef Inst)
 Determine whether an instruction has any metadata attached.
LLVMValueRef LLVMGetMetadata (LLVMValueRef Inst, unsigned KindID)
 Return metadata associated with an instruction value.
static MDNodeextractMDNode (MetadataAsValue *MAV)
void LLVMSetMetadata (LLVMValueRef Inst, unsigned KindID, LLVMValueRef Val)
 Set metadata associated with an instruction value.
LLVMValueRef LLVMIsAMDNode (LLVMValueRef Val)
LLVMValueRef LLVMIsAMDString (LLVMValueRef Val)
LLVMUseRef LLVMGetFirstUse (LLVMValueRef Val)
 Obtain the first use of a value.
LLVMUseRef LLVMGetNextUse (LLVMUseRef U)
 Obtain the next use of a value.
LLVMValueRef LLVMGetUser (LLVMUseRef U)
 Obtain the user value for a user.
LLVMValueRef LLVMGetUsedValue (LLVMUseRef U)
 Obtain the value this use corresponds to.
static LLVMValueRef getMDNodeOperandImpl (LLVMContext &Context, const MDNode *N, unsigned Index)
LLVMValueRef LLVMGetOperand (LLVMValueRef Val, unsigned Index)
 Obtain an operand at a specific index in a llvm::User value.
LLVMUseRef LLVMGetOperandUse (LLVMValueRef Val, unsigned Index)
 Obtain the use of an operand at a specific index in a llvm::User value.
void LLVMSetOperand (LLVMValueRef Val, unsigned Index, LLVMValueRef Op)
 Set an operand at a specific index in a llvm::User value.
int LLVMGetNumOperands (LLVMValueRef Val)
 Obtain the number of operands in a llvm::User value.
LLVMValueRef LLVMConstNull (LLVMTypeRef Ty)
 Obtain a constant value referring to the null instance of a type.
LLVMValueRef LLVMConstAllOnes (LLVMTypeRef Ty)
 Obtain a constant value referring to the instance of a type consisting of all ones.
LLVMValueRef LLVMGetUndef (LLVMTypeRef Ty)
 Obtain a constant value referring to an undefined value of a type.
LLVMBool LLVMIsConstant (LLVMValueRef Ty)
 Determine whether the specified constant instance is constant.
LLVMBool LLVMIsNull (LLVMValueRef Val)
 Determine whether a value instance is null.
LLVMBool LLVMIsUndef (LLVMValueRef Val)
 Determine whether a value instance is undefined.
LLVMValueRef LLVMConstPointerNull (LLVMTypeRef Ty)
 Obtain a constant that is a constant pointer pointing to NULL for a specified type.
LLVMValueRef LLVMMDStringInContext (LLVMContextRef C, const char *Str, unsigned SLen)
 Obtain a MDString value from a context.
LLVMValueRef LLVMMDString (const char *Str, unsigned SLen)
 Obtain a MDString value from the global context.
LLVMValueRef LLVMMDNodeInContext (LLVMContextRef C, LLVMValueRef *Vals, unsigned Count)
 Obtain a MDNode value from a context.
LLVMValueRef LLVMMDNode (LLVMValueRef *Vals, unsigned Count)
 Obtain a MDNode value from the global context.
const char * LLVMGetMDString (LLVMValueRef V, unsigned *Len)
 Obtain the underlying string from a MDString value.
unsigned LLVMGetMDNodeNumOperands (LLVMValueRef V)
 Obtain the number of operands from an MDNode value.
void LLVMGetMDNodeOperands (LLVMValueRef V, LLVMValueRef *Dest)
 Obtain the given MDNode's operands.
unsigned LLVMGetNamedMetadataNumOperands (LLVMModuleRef M, const char *name)
 Obtain the number of operands for named metadata in a module.
void LLVMGetNamedMetadataOperands (LLVMModuleRef M, const char *name, LLVMValueRef *Dest)
 Obtain the named metadata operands for a module.
void LLVMAddNamedMetadataOperand (LLVMModuleRef M, const char *name, LLVMValueRef Val)
 Add an operand to named metadata.
LLVMValueRef LLVMConstInt (LLVMTypeRef IntTy, unsigned long long N, LLVMBool SignExtend)
 Obtain a constant value for an integer type.
LLVMValueRef LLVMConstIntOfArbitraryPrecision (LLVMTypeRef IntTy, unsigned NumWords, const uint64_t Words[])
 Obtain a constant value for an integer of arbitrary precision.
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)
 Obtain a constant value referring to a double floating point value.
LLVMValueRef LLVMConstRealOfString (LLVMTypeRef RealTy, const char *Text)
 Obtain a constant for a floating point value parsed from a string.
LLVMValueRef LLVMConstRealOfStringAndSize (LLVMTypeRef RealTy, const char Str[], unsigned SLen)
unsigned long long LLVMConstIntGetZExtValue (LLVMValueRef ConstantVal)
 Obtain the zero extended value for an integer constant value.
long long LLVMConstIntGetSExtValue (LLVMValueRef ConstantVal)
 Obtain the sign extended value for an integer constant value.
double LLVMConstRealGetDouble (LLVMValueRef ConstantVal, LLVMBool *LosesInfo)
 Obtain the double value for an floating point constant value.
LLVMValueRef LLVMConstStringInContext (LLVMContextRef C, const char *Str, unsigned Length, LLVMBool DontNullTerminate)
 Create a ConstantDataSequential and initialize it with a string.
LLVMValueRef LLVMConstStructInContext (LLVMContextRef C, LLVMValueRef *ConstantVals, unsigned Count, LLVMBool Packed)
 Create an anonymous ConstantStruct with the specified values.
LLVMValueRef LLVMConstString (const char *Str, unsigned Length, LLVMBool DontNullTerminate)
 Create a ConstantDataSequential with string content in the global context.
LLVMValueRef LLVMGetElementAsConstant (LLVMValueRef c, unsigned idx)
 Get an element at specified index as a constant.
LLVMBool LLVMIsConstantString (LLVMValueRef c)
 Returns true if the specified constant is an array of i8.
const char * LLVMGetAsString (LLVMValueRef c, size_t *Length)
 Get the given constant data sequential as a string.
LLVMValueRef LLVMConstArray (LLVMTypeRef ElementTy, LLVMValueRef *ConstantVals, unsigned Length)
 Create a ConstantArray from values.
LLVMValueRef LLVMConstStruct (LLVMValueRef *ConstantVals, unsigned Count, LLVMBool Packed)
 Create a ConstantStruct in the global Context.
LLVMValueRef LLVMConstNamedStruct (LLVMTypeRef StructTy, LLVMValueRef *ConstantVals, unsigned Count)
 Create a non-anonymous ConstantStruct from values.
LLVMValueRef LLVMConstVector (LLVMValueRef *ScalarConstantVals, unsigned Size)
 Create a ConstantVector from values.
static LLVMOpcode map_to_llvmopcode (int opcode)
static int map_from_llvmopcode (LLVMOpcode code)
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 LLVMConstFNeg (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 LLVMConstFAdd (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
LLVMValueRef LLVMConstSub (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
LLVMValueRef LLVMConstNSWSub (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
LLVMValueRef LLVMConstNUWSub (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
LLVMValueRef LLVMConstFSub (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
LLVMValueRef LLVMConstMul (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
LLVMValueRef LLVMConstNSWMul (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
LLVMValueRef LLVMConstNUWMul (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
LLVMValueRef LLVMConstFMul (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
LLVMValueRef LLVMConstUDiv (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
LLVMValueRef LLVMConstSDiv (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
LLVMValueRef LLVMConstExactSDiv (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
LLVMValueRef LLVMConstFDiv (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
LLVMValueRef LLVMConstURem (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
LLVMValueRef LLVMConstSRem (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
LLVMValueRef LLVMConstFRem (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
LLVMValueRef LLVMConstAnd (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
LLVMValueRef LLVMConstOr (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
LLVMValueRef LLVMConstXor (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
LLVMValueRef LLVMConstICmp (LLVMIntPredicate Predicate, LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
LLVMValueRef LLVMConstFCmp (LLVMRealPredicate Predicate, LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
LLVMValueRef LLVMConstShl (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
LLVMValueRef LLVMConstLShr (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
LLVMValueRef LLVMConstAShr (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
LLVMValueRef LLVMConstGEP (LLVMValueRef ConstantVal, LLVMValueRef *ConstantIndices, unsigned NumIndices)
LLVMValueRef LLVMConstInBoundsGEP (LLVMValueRef ConstantVal, LLVMValueRef *ConstantIndices, unsigned NumIndices)
LLVMValueRef LLVMConstTrunc (LLVMValueRef ConstantVal, LLVMTypeRef ToType)
LLVMValueRef LLVMConstSExt (LLVMValueRef ConstantVal, LLVMTypeRef ToType)
LLVMValueRef LLVMConstZExt (LLVMValueRef ConstantVal, LLVMTypeRef ToType)
LLVMValueRef LLVMConstFPTrunc (LLVMValueRef ConstantVal, LLVMTypeRef ToType)
LLVMValueRef LLVMConstFPExt (LLVMValueRef ConstantVal, LLVMTypeRef ToType)
LLVMValueRef LLVMConstUIToFP (LLVMValueRef ConstantVal, LLVMTypeRef ToType)
LLVMValueRef LLVMConstSIToFP (LLVMValueRef ConstantVal, LLVMTypeRef ToType)
LLVMValueRef LLVMConstFPToUI (LLVMValueRef ConstantVal, LLVMTypeRef ToType)
LLVMValueRef LLVMConstFPToSI (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 LLVMConstZExtOrBitCast (LLVMValueRef ConstantVal, LLVMTypeRef ToType)
LLVMValueRef LLVMConstSExtOrBitCast (LLVMValueRef ConstantVal, LLVMTypeRef ToType)
LLVMValueRef LLVMConstTruncOrBitCast (LLVMValueRef ConstantVal, LLVMTypeRef ToType)
LLVMValueRef LLVMConstPointerCast (LLVMValueRef ConstantVal, LLVMTypeRef ToType)
LLVMValueRef LLVMConstIntCast (LLVMValueRef ConstantVal, LLVMTypeRef ToType, LLVMBool isSigned)
LLVMValueRef LLVMConstFPCast (LLVMValueRef ConstantVal, LLVMTypeRef ToType)
LLVMValueRef LLVMConstSelect (LLVMValueRef ConstantCondition, LLVMValueRef ConstantIfTrue, LLVMValueRef ConstantIfFalse)
LLVMValueRef LLVMConstExtractElement (LLVMValueRef VectorConstant, LLVMValueRef IndexConstant)
LLVMValueRef LLVMConstInsertElement (LLVMValueRef VectorConstant, LLVMValueRef ElementValueConstant, LLVMValueRef IndexConstant)
LLVMValueRef LLVMConstShuffleVector (LLVMValueRef VectorAConstant, LLVMValueRef VectorBConstant, LLVMValueRef MaskConstant)
LLVMValueRef LLVMConstExtractValue (LLVMValueRef AggConstant, unsigned *IdxList, unsigned NumIdx)
LLVMValueRef LLVMConstInsertValue (LLVMValueRef AggConstant, LLVMValueRef ElementValueConstant, unsigned *IdxList, unsigned NumIdx)
LLVMValueRef LLVMConstInlineAsm (LLVMTypeRef Ty, const char *AsmString, const char *Constraints, LLVMBool HasSideEffects, LLVMBool IsAlignStack)
LLVMValueRef LLVMBlockAddress (LLVMValueRef F, LLVMBasicBlockRef BB)
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)
LLVMBool LLVMHasUnnamedAddr (LLVMValueRef Global)
void LLVMSetUnnamedAddr (LLVMValueRef Global, LLVMBool HasUnnamedAddr)
unsigned LLVMGetAlignment (LLVMValueRef V)
 Obtain the preferred alignment of the value.
void LLVMSetAlignment (LLVMValueRef V, unsigned Bytes)
 Set the preferred alignment of the value.
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 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)
LLVMValueRef LLVMAddAlias (LLVMModuleRef M, LLVMTypeRef Ty, LLVMValueRef Aliasee, const char *Name)
LLVMValueRef LLVMAddFunction (LLVMModuleRef M, const char *Name, LLVMTypeRef FunctionTy)
 Add a function to a module under a specified name.
LLVMValueRef LLVMGetNamedFunction (LLVMModuleRef M, const char *Name)
 Obtain a Function value from a Module by its name.
LLVMValueRef LLVMGetFirstFunction (LLVMModuleRef M)
 Obtain an iterator to the first Function in a Module.
LLVMValueRef LLVMGetLastFunction (LLVMModuleRef M)
 Obtain an iterator to the last Function in a Module.
LLVMValueRef LLVMGetNextFunction (LLVMValueRef Fn)
 Advance a Function iterator to the next Function.
LLVMValueRef LLVMGetPreviousFunction (LLVMValueRef Fn)
 Decrement a Function iterator to the previous Function.
void LLVMDeleteFunction (LLVMValueRef Fn)
 Remove a function from its containing module and deletes it.
unsigned LLVMGetIntrinsicID (LLVMValueRef Fn)
 Obtain the ID number from a function instance.
unsigned LLVMGetFunctionCallConv (LLVMValueRef Fn)
 Obtain the calling function of a function.
void LLVMSetFunctionCallConv (LLVMValueRef Fn, unsigned CC)
 Set the calling convention of a function.
const char * LLVMGetGC (LLVMValueRef Fn)
 Obtain the name of the garbage collector to use during code generation.
void LLVMSetGC (LLVMValueRef Fn, const char *GC)
 Define the garbage collector to use during code generation.
void LLVMAddFunctionAttr (LLVMValueRef Fn, LLVMAttribute PA)
 Add an attribute to a function.
void LLVMAddTargetDependentFunctionAttr (LLVMValueRef Fn, const char *A, const char *V)
 Add a target-dependent attribute to a fuction.
void LLVMRemoveFunctionAttr (LLVMValueRef Fn, LLVMAttribute PA)
 Remove an attribute from a function.
LLVMAttribute LLVMGetFunctionAttr (LLVMValueRef Fn)
 Obtain an attribute from a function.
unsigned LLVMCountParams (LLVMValueRef FnRef)
 Obtain the number of parameters in a function.
void LLVMGetParams (LLVMValueRef FnRef, LLVMValueRef *ParamRefs)
 Obtain the parameters in a function.
LLVMValueRef LLVMGetParam (LLVMValueRef FnRef, unsigned index)
 Obtain the parameter at the specified index.
LLVMValueRef LLVMGetParamParent (LLVMValueRef V)
 Obtain the function to which this argument belongs.
LLVMValueRef LLVMGetFirstParam (LLVMValueRef Fn)
 Obtain the first parameter to a function.
LLVMValueRef LLVMGetLastParam (LLVMValueRef Fn)
 Obtain the last parameter to a function.
LLVMValueRef LLVMGetNextParam (LLVMValueRef Arg)
 Obtain the next parameter to a function.
LLVMValueRef LLVMGetPreviousParam (LLVMValueRef Arg)
 Obtain the previous parameter to a function.
void LLVMAddAttribute (LLVMValueRef Arg, LLVMAttribute PA)
 Add an attribute to a function argument.
void LLVMRemoveAttribute (LLVMValueRef Arg, LLVMAttribute PA)
 Remove an attribute from a function argument.
LLVMAttribute LLVMGetAttribute (LLVMValueRef Arg)
 Get an attribute from a function argument.
void LLVMSetParamAlignment (LLVMValueRef Arg, unsigned align)
 Set the alignment for a function parameter.
LLVMValueRef LLVMBasicBlockAsValue (LLVMBasicBlockRef BB)
 Convert a basic block instance to a value type.
LLVMBool LLVMValueIsBasicBlock (LLVMValueRef Val)
 Determine whether an LLVMValueRef is itself a basic block.
LLVMBasicBlockRef LLVMValueAsBasicBlock (LLVMValueRef Val)
 Convert an LLVMValueRef to an LLVMBasicBlockRef instance.
LLVMValueRef LLVMGetBasicBlockParent (LLVMBasicBlockRef BB)
 Obtain the function to which a basic block belongs.
LLVMValueRef LLVMGetBasicBlockTerminator (LLVMBasicBlockRef BB)
 Obtain the terminator instruction for a basic block.
unsigned LLVMCountBasicBlocks (LLVMValueRef FnRef)
 Obtain the number of basic blocks in a function.
void LLVMGetBasicBlocks (LLVMValueRef FnRef, LLVMBasicBlockRef *BasicBlocksRefs)
 Obtain all of the basic blocks in a function.
LLVMBasicBlockRef LLVMGetEntryBasicBlock (LLVMValueRef Fn)
 Obtain the basic block that corresponds to the entry point of a function.
LLVMBasicBlockRef LLVMGetFirstBasicBlock (LLVMValueRef Fn)
 Obtain the first basic block in a function.
LLVMBasicBlockRef LLVMGetLastBasicBlock (LLVMValueRef Fn)
 Obtain the last basic block in a function.
LLVMBasicBlockRef LLVMGetNextBasicBlock (LLVMBasicBlockRef BB)
 Advance a basic block iterator.
LLVMBasicBlockRef LLVMGetPreviousBasicBlock (LLVMBasicBlockRef BB)
 Go backwards in a basic block iterator.
LLVMBasicBlockRef LLVMAppendBasicBlockInContext (LLVMContextRef C, LLVMValueRef FnRef, const char *Name)
 Append a basic block to the end of a function.
LLVMBasicBlockRef LLVMAppendBasicBlock (LLVMValueRef FnRef, const char *Name)
 Append a basic block to the end of a function using the global context.
LLVMBasicBlockRef LLVMInsertBasicBlockInContext (LLVMContextRef C, LLVMBasicBlockRef BBRef, const char *Name)
 Insert a basic block in a function before another basic block.
LLVMBasicBlockRef LLVMInsertBasicBlock (LLVMBasicBlockRef BBRef, const char *Name)
 Insert a basic block in a function using the global context.
void LLVMDeleteBasicBlock (LLVMBasicBlockRef BBRef)
 Remove a basic block from a function and delete it.
void LLVMRemoveBasicBlockFromParent (LLVMBasicBlockRef BBRef)
 Remove a basic block from a function.
void LLVMMoveBasicBlockBefore (LLVMBasicBlockRef BB, LLVMBasicBlockRef MovePos)
 Move a basic block to before another one.
void LLVMMoveBasicBlockAfter (LLVMBasicBlockRef BB, LLVMBasicBlockRef MovePos)
 Move a basic block to after another one.
LLVMBasicBlockRef LLVMGetInstructionParent (LLVMValueRef Inst)
 Obtain the basic block to which an instruction belongs.
LLVMValueRef LLVMGetFirstInstruction (LLVMBasicBlockRef BB)
 Obtain the first instruction in a basic block.
LLVMValueRef LLVMGetLastInstruction (LLVMBasicBlockRef BB)
 Obtain the last instruction in a basic block.
LLVMValueRef LLVMGetNextInstruction (LLVMValueRef Inst)
 Obtain the instruction that occurs after the one specified.
LLVMValueRef LLVMGetPreviousInstruction (LLVMValueRef Inst)
 Obtain the instruction that occurred before this one.
void LLVMInstructionEraseFromParent (LLVMValueRef Inst)
 Remove and delete an instruction.
LLVMIntPredicate LLVMGetICmpPredicate (LLVMValueRef Inst)
 Obtain the predicate of an instruction.
LLVMRealPredicate LLVMGetFCmpPredicate (LLVMValueRef Inst)
 Obtain the float predicate of an instruction.
LLVMOpcode LLVMGetInstructionOpcode (LLVMValueRef Inst)
 Obtain the code opcode for an individual instruction.
LLVMValueRef LLVMInstructionClone (LLVMValueRef Inst)
 Create a copy of 'this' instruction that is identical in all ways except the following: * The instruction has no parent * The instruction has no name.
unsigned LLVMGetInstructionCallConv (LLVMValueRef Instr)
 Obtain the calling convention for a call instruction.
void LLVMSetInstructionCallConv (LLVMValueRef Instr, unsigned CC)
 Set the calling convention for a call instruction.
void LLVMAddInstrAttribute (LLVMValueRef Instr, unsigned index, LLVMAttribute PA)
void LLVMRemoveInstrAttribute (LLVMValueRef Instr, unsigned index, LLVMAttribute PA)
void LLVMSetInstrParamAlignment (LLVMValueRef Instr, unsigned index, unsigned align)
LLVMBool LLVMIsTailCall (LLVMValueRef Call)
 Obtain whether a call instruction is a tail call.
void LLVMSetTailCall (LLVMValueRef Call, LLVMBool isTailCall)
 Set whether a call instruction is a tail call.
unsigned LLVMGetNumSuccessors (LLVMValueRef Term)
 Return the number of successors that this terminator has.
LLVMBasicBlockRef LLVMGetSuccessor (LLVMValueRef Term, unsigned i)
 Return the specified successor.
void LLVMSetSuccessor (LLVMValueRef Term, unsigned i, LLVMBasicBlockRef block)
 Update the specified successor to point at the provided block.
LLVMBool LLVMIsConditional (LLVMValueRef Branch)
 Return if a branch is conditional.
LLVMValueRef LLVMGetCondition (LLVMValueRef Branch)
 Return the condition of a branch instruction.
void LLVMSetCondition (LLVMValueRef Branch, LLVMValueRef Cond)
 Set the condition of a branch instruction.
LLVMBasicBlockRef LLVMGetSwitchDefaultDest (LLVMValueRef Switch)
 Obtain the default destination basic block of a switch instruction.
void LLVMAddIncoming (LLVMValueRef PhiNode, LLVMValueRef *IncomingValues, LLVMBasicBlockRef *IncomingBlocks, unsigned Count)
 Add an incoming value to the end of a PHI list.
unsigned LLVMCountIncoming (LLVMValueRef PhiNode)
 Obtain the number of incoming basic blocks to a PHI node.
LLVMValueRef LLVMGetIncomingValue (LLVMValueRef PhiNode, unsigned Index)
 Obtain an incoming value to a PHI node as an LLVMValueRef.
LLVMBasicBlockRef LLVMGetIncomingBlock (LLVMValueRef PhiNode, unsigned Index)
 Obtain an incoming value to a PHI node as an LLVMBasicBlockRef.
LLVMBuilderRef LLVMCreateBuilderInContext (LLVMContextRef C)
LLVMBuilderRef LLVMCreateBuilder (void)
void LLVMPositionBuilder (LLVMBuilderRef Builder, LLVMBasicBlockRef Block, LLVMValueRef Instr)
void LLVMPositionBuilderBefore (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)
void LLVMSetCurrentDebugLocation (LLVMBuilderRef Builder, LLVMValueRef L)
LLVMValueRef LLVMGetCurrentDebugLocation (LLVMBuilderRef Builder)
void LLVMSetInstDebugLocation (LLVMBuilderRef Builder, LLVMValueRef Inst)
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 LLVMBuildInvoke (LLVMBuilderRef B, LLVMValueRef Fn, LLVMValueRef *Args, unsigned NumArgs, LLVMBasicBlockRef Then, LLVMBasicBlockRef Catch, const char *Name)
LLVMValueRef LLVMBuildLandingPad (LLVMBuilderRef B, LLVMTypeRef Ty, unsigned NumClauses, const char *Name)
LLVMValueRef LLVMBuildResume (LLVMBuilderRef B, LLVMValueRef Exn)
LLVMValueRef LLVMBuildUnreachable (LLVMBuilderRef B)
void LLVMAddCase (LLVMValueRef Switch, LLVMValueRef OnVal, LLVMBasicBlockRef Dest)
void LLVMAddDestination (LLVMValueRef IndirectBr, LLVMBasicBlockRef Dest)
void LLVMAddClause (LLVMValueRef LandingPad, LLVMValueRef ClauseVal)
void LLVMSetCleanup (LLVMValueRef LandingPad, LLVMBool Val)
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 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)
LLVMValueRef LLVMBuildMalloc (LLVMBuilderRef B, LLVMTypeRef Ty, const char *Name)
LLVMValueRef LLVMBuildArrayMalloc (LLVMBuilderRef B, LLVMTypeRef Ty, LLVMValueRef Val, const char *Name)
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 LLVMBuildLoad (LLVMBuilderRef B, LLVMValueRef PointerVal, const char *Name)
LLVMValueRef LLVMBuildStore (LLVMBuilderRef B, LLVMValueRef Val, LLVMValueRef PointerVal)
static AtomicOrdering mapFromLLVMOrdering (LLVMAtomicOrdering Ordering)
LLVMValueRef LLVMBuildFence (LLVMBuilderRef B, LLVMAtomicOrdering Ordering, LLVMBool isSingleThread, const char *Name)
LLVMValueRef LLVMBuildGEP (LLVMBuilderRef B, LLVMValueRef Pointer, LLVMValueRef *Indices, unsigned NumIndices, const char *Name)
LLVMValueRef LLVMBuildInBoundsGEP (LLVMBuilderRef B, LLVMValueRef Pointer, LLVMValueRef *Indices, unsigned NumIndices, const char *Name)
LLVMValueRef LLVMBuildStructGEP (LLVMBuilderRef B, 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)
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 LLVMBuildIntCast (LLVMBuilderRef B, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
LLVMValueRef LLVMBuildFPCast (LLVMBuilderRef B, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
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)
LLVMValueRef LLVMBuildPhi (LLVMBuilderRef B, LLVMTypeRef Ty, const char *Name)
LLVMValueRef LLVMBuildCall (LLVMBuilderRef B, LLVMValueRef Fn, LLVMValueRef *Args, unsigned NumArgs, 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 LLVMBuildIsNull (LLVMBuilderRef B, LLVMValueRef Val, const char *Name)
LLVMValueRef LLVMBuildIsNotNull (LLVMBuilderRef B, LLVMValueRef Val, const char *Name)
LLVMValueRef LLVMBuildPtrDiff (LLVMBuilderRef B, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
LLVMValueRef LLVMBuildAtomicRMW (LLVMBuilderRef B, LLVMAtomicRMWBinOp op, LLVMValueRef PTR, LLVMValueRef Val, LLVMAtomicOrdering ordering, LLVMBool singleThread)
LLVMModuleProviderRef LLVMCreateModuleProviderForExistingModule (LLVMModuleRef M)
 Changes the type of M so it can be passed to FunctionPassManagers and the JIT.
void LLVMDisposeModuleProvider (LLVMModuleProviderRef MP)
 Destroys the module M.
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)
LLVMPassRegistryRef LLVMGetGlobalPassRegistry (void)
 Return the global pass registry, for use with initialization functions.
LLVMPassManagerRef LLVMCreatePassManager ()
 Constructs a new whole-module pass pipeline.
LLVMPassManagerRef LLVMCreateFunctionPassManagerForModule (LLVMModuleRef M)
 Constructs a new function-by-function pass pipeline over the module provider.
LLVMPassManagerRef LLVMCreateFunctionPassManager (LLVMModuleProviderRef P)
 Deprecated: Use LLVMCreateFunctionPassManagerForModule instead.
LLVMBool LLVMRunPassManager (LLVMPassManagerRef PM, LLVMModuleRef M)
 Initializes, executes on the provided module, and finalizes all of the passes scheduled in the pass manager.
LLVMBool LLVMInitializeFunctionPassManager (LLVMPassManagerRef FPM)
 Initializes all of the function passes scheduled in the function pass manager.
LLVMBool LLVMRunFunctionPassManager (LLVMPassManagerRef FPM, LLVMValueRef F)
 Executes all of the function passes scheduled in the function pass manager on the provided function.
LLVMBool LLVMFinalizeFunctionPassManager (LLVMPassManagerRef FPM)
 Finalizes all of the function passes scheduled in in the function pass manager.
void LLVMDisposePassManager (LLVMPassManagerRef PM)
 Frees the memory of a pass pipeline.
LLVMBool LLVMStartMultithreaded ()
 Deprecated: Multi-threading can only be enabled/disabled with the compile time define LLVM_ENABLE_THREADS.
void LLVMStopMultithreaded ()
 Deprecated: Multi-threading can only be enabled/disabled with the compile time define LLVM_ENABLE_THREADS.
LLVMBool LLVMIsMultithreaded ()
 Check whether LLVM is executing in thread-safe mode or not.

Define Documentation

#define DEBUG_TYPE   "ir"

Definition at line 45 of file Core.cpp.

#define HANDLE_INST (   num,
  opc,
  clas 
)    case num: return LLVM##opc;
#define HANDLE_INST (   num,
  opc,
  clas 
)    case LLVM##opc: return num;
Value:
LLVMValueRef LLVMIsA##name(LLVMValueRef Val) {                           \
    return wrap(static_cast<Value*>(dyn_cast_or_null<name>(unwrap(Val)))); \
  }

Definition at line 599 of file Core.cpp.


Function Documentation

static MDNode* extractMDNode ( MetadataAsValue MAV) [static]
static LLVMValueRef getMDNodeOperandImpl ( LLVMContext Context,
const MDNode N,
unsigned  Index 
) [static]
LLVMValueRef LLVMConstIntOfString ( LLVMTypeRef  IntTy,
const char  Str[],
uint8_t  Radix 
)

Definition at line 842 of file Core.cpp.

References llvm::ConstantInt::get(), and llvm::wrap().

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

Definition at line 848 of file Core.cpp.

References llvm::ConstantInt::get(), and llvm::wrap().

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

Definition at line 862 of file Core.cpp.

References llvm::ConstantFP::get(), llvm::unwrap(), and llvm::wrap().

Definition at line 335 of file Core.cpp.

References LLVMGetGlobalContext(), and LLVMInt128TypeInContext().

Definition at line 313 of file Core.cpp.

References llvm::Type::getInt128Ty(), and llvm::unwrap().

Referenced by LLVMInt128Type().

static int map_from_llvmopcode ( LLVMOpcode  code) [static]

Definition at line 972 of file Core.cpp.

References llvm_unreachable.

Referenced by LLVMBuildBinOp(), and LLVMBuildCast().

static LLVMOpcode map_to_llvmopcode ( int  opcode) [static]

Definition at line 962 of file Core.cpp.

References llvm_unreachable.

Referenced by LLVMGetConstOpcode(), and LLVMGetInstructionOpcode().

static AtomicOrdering mapFromLLVMOrdering ( LLVMAtomicOrdering  Ordering) [static]