LLVM: lib/IR/Core.cpp File Reference (original) (raw)
Macros
#define
DEBUG_TYPE "ir"
#define
#define
HANDLE_VALUE(Name)
#define
#define
HANDLE_INST(num, opc, clas)
#define
HANDLE_INST(num, opc, clas)
Functions
BasicBlock **
unwrap (LLVMBasicBlockRef *BBs)
void
LLVMShutdown ()
Deallocate and destroy all ManagedStatic variables.
void
LLVMGetVersion (unsigned *Major, unsigned *Minor, unsigned *Patch)
Return the major, minor, and patch version of LLVM.
char *
LLVMCreateMessage (const char *Message)
void
LLVMDisposeMessage (char *Message)
static LLVMContext &
Create a new context.
void
LLVMContextSetDiagnosticHandler (LLVMContextRef C, LLVMDiagnosticHandler Handler, void *DiagnosticContext)
Set the diagnostic handler for this context.
LLVMContextGetDiagnosticHandler (LLVMContextRef C)
Get the diagnostic handler of this context.
void *
LLVMContextGetDiagnosticContext (LLVMContextRef C)
Get the diagnostic context of this context.
void
LLVMContextSetYieldCallback (LLVMContextRef C, LLVMYieldCallback Callback, void *OpaqueHandle)
Set the yield callback function for this context.
LLVMContextShouldDiscardValueNames (LLVMContextRef C)
Retrieve whether the given context is set to discard all value names.
void
LLVMContextSetDiscardValueNames (LLVMContextRef C, LLVMBool Discard)
Set whether the given context discards all value names.
void
LLVMContextDispose (LLVMContextRef C)
Destroy a context instance.
LLVMGetMDKindIDInContext (LLVMContextRef C, const char *Name, unsigned SLen)
LLVMGetMDKindID (const char *Name, unsigned SLen)
LLVMGetSyncScopeID (LLVMContextRef C, const char *Name, size_t SLen)
Maps a synchronization scope name to a ID unique within this context.
LLVMGetEnumAttributeKindForName (const char *Name, size_t SLen)
Return an unique id given the name of a enum attribute, or 0 if no attribute by that name exists.
LLVMGetLastEnumAttributeKind (void)
LLVMCreateEnumAttribute (LLVMContextRef C, unsigned KindID, uint64_t Val)
Create an enum attribute.
LLVMGetEnumAttributeKind (LLVMAttributeRef A)
Get the unique id corresponding to the enum attribute passed as argument.
LLVMGetEnumAttributeValue (LLVMAttributeRef A)
Get the enum attribute's value.
LLVMCreateTypeAttribute (LLVMContextRef C, unsigned KindID, LLVMTypeRef type_ref)
Create a type attribute.
LLVMGetTypeAttributeValue (LLVMAttributeRef A)
Get the type attribute's value.
LLVMCreateConstantRangeAttribute (LLVMContextRef C, unsigned KindID, unsigned NumBits, const uint64_t LowerWords[], const uint64_t UpperWords[])
Create a ConstantRange attribute.
LLVMCreateStringAttribute (LLVMContextRef C, const char *K, unsigned KLength, const char *V, unsigned VLength)
Create a string attribute.
LLVMGetStringAttributeKind (LLVMAttributeRef A, unsigned *Length)
Get the string attribute's kind.
LLVMGetStringAttributeValue (LLVMAttributeRef A, unsigned *Length)
Get the string attribute's value.
LLVMIsEnumAttribute (LLVMAttributeRef A)
Check for the different types of attributes.
LLVMIsStringAttribute (LLVMAttributeRef A)
LLVMIsTypeAttribute (LLVMAttributeRef A)
char *
LLVMGetDiagInfoDescription (LLVMDiagnosticInfoRef DI)
Return a string representation of the DiagnosticInfo.
LLVMGetDiagInfoSeverity (LLVMDiagnosticInfoRef DI)
Return an enum LLVMDiagnosticSeverity.
LLVMModuleCreateWithName (const char *ModuleID)
LLVMModuleCreateWithNameInContext (const char *ModuleID, LLVMContextRef C)
Create a new, empty module in a specific context.
void
LLVMDisposeModule (LLVMModuleRef M)
Destroy a module instance.
LLVMGetModuleIdentifier (LLVMModuleRef M, size_t *Len)
Obtain the identifier of a module.
void
LLVMSetModuleIdentifier (LLVMModuleRef M, const char *Ident, size_t Len)
Set the identifier of a module to a string Ident with length Len.
LLVMGetSourceFileName (LLVMModuleRef M, size_t *Len)
Obtain the module's original source file name.
void
LLVMSetSourceFileName (LLVMModuleRef M, const char *Name, size_t Len)
Set the original source file name of a module to a string Name with length Len.
LLVMGetDataLayoutStr (LLVMModuleRef M)
Obtain the data layout for a module.
LLVMGetDataLayout (LLVMModuleRef M)
void
LLVMSetDataLayout (LLVMModuleRef M, const char *DataLayoutStr)
Set the data layout for a module.
LLVMGetTarget (LLVMModuleRef M)
Obtain the target triple for a module.
void
LLVMSetTarget (LLVMModuleRef M, const char *TripleStr)
Set the target triple for a module.
static Module::ModFlagBehavior
map_to_llvmModFlagBehavior (LLVMModuleFlagBehavior Behavior)
static LLVMModuleFlagBehavior
map_from_llvmModFlagBehavior (Module::ModFlagBehavior Behavior)
LLVMCopyModuleFlagsMetadata (LLVMModuleRef M, size_t *Len)
Returns the module flags as an array of flag-key-value triples.
void
LLVMDisposeModuleFlagsMetadata (LLVMModuleFlagEntry *Entries)
Destroys module flags metadata entries.
LLVMModuleFlagEntriesGetFlagBehavior (LLVMModuleFlagEntry *Entries, unsigned Index)
Returns the flag behavior for a module flag entry at a specific index.
LLVMModuleFlagEntriesGetKey (LLVMModuleFlagEntry *Entries, unsigned Index, size_t *Len)
Returns the key for a module flag entry at a specific index.
LLVMModuleFlagEntriesGetMetadata (LLVMModuleFlagEntry *Entries, unsigned Index)
Returns the metadata for a module flag entry at a specific index.
LLVMGetModuleFlag (LLVMModuleRef M, const char *Key, size_t KeyLen)
Add a module-level flag to the module-level flags metadata if it doesn't already exist.
void
LLVMAddModuleFlag (LLVMModuleRef M, LLVMModuleFlagBehavior Behavior, const char *Key, size_t KeyLen, LLVMMetadataRef Val)
Add a module-level flag to the module-level flags metadata if it doesn't already exist.
LLVMIsNewDbgInfoFormat (LLVMModuleRef M)
Soon to be deprecated.
void
LLVMSetIsNewDbgInfoFormat (LLVMModuleRef M, LLVMBool UseNewFormat)
Soon to be deprecated.
void
LLVMDumpModule (LLVMModuleRef M)
Dump a representation of a module to stderr.
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
LLVMSetModuleInlineAsm2 (LLVMModuleRef M, const char *Asm, size_t Len)
Set inline assembly for a module.
void
LLVMSetModuleInlineAsm (LLVMModuleRef M, const char *Asm)
Deprecated: Use LLVMSetModuleInlineAsm2 instead.
void
LLVMAppendModuleInlineAsm (LLVMModuleRef M, const char *Asm, size_t Len)
Append inline assembly to a module.
LLVMGetModuleInlineAsm (LLVMModuleRef M, size_t *Len)
Get inline assembly for a module.
LLVMGetInlineAsm (LLVMTypeRef Ty, const char *AsmString, size_t AsmStringSize, const char *Constraints, size_t ConstraintsSize, LLVMBool HasSideEffects, LLVMBool IsAlignStack, LLVMInlineAsmDialect Dialect, LLVMBool CanThrow)
Create the specified uniqued inline asm string.
LLVMGetInlineAsmAsmString (LLVMValueRef InlineAsmVal, size_t *Len)
Get the template string used for an inline assembly snippet.
LLVMGetInlineAsmConstraintString (LLVMValueRef InlineAsmVal, size_t *Len)
Get the raw constraint string for an inline assembly snippet.
LLVMGetInlineAsmDialect (LLVMValueRef InlineAsmVal)
Get the dialect used by the inline asm snippet.
LLVMGetInlineAsmFunctionType (LLVMValueRef InlineAsmVal)
Get the function type of the inline assembly snippet.
LLVMGetInlineAsmHasSideEffects (LLVMValueRef InlineAsmVal)
Get if the inline asm snippet has side effects.
LLVMGetInlineAsmNeedsAlignedStack (LLVMValueRef InlineAsmVal)
Get if the inline asm snippet needs an aligned stack.
LLVMGetInlineAsmCanUnwind (LLVMValueRef InlineAsmVal)
Get if the inline asm snippet may unwind the stack.
LLVMGetModuleContext (LLVMModuleRef M)
Obtain the context to which this module is associated.
LLVMGetTypeKind (LLVMTypeRef Ty)
Obtain the enumerated type of a Type instance.
LLVMTypeIsSized (LLVMTypeRef Ty)
Whether the type has a known size.
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.
LLVMInt1TypeInContext (LLVMContextRef C)
Obtain an integer type from a context with specified bit width.
LLVMInt8TypeInContext (LLVMContextRef C)
LLVMInt16TypeInContext (LLVMContextRef C)
LLVMInt32TypeInContext (LLVMContextRef C)
LLVMInt64TypeInContext (LLVMContextRef C)
LLVMInt128TypeInContext (LLVMContextRef C)
LLVMIntTypeInContext (LLVMContextRef C, unsigned NumBits)
LLVMInt1Type (void)
LLVMInt8Type (void)
LLVMInt16Type (void)
LLVMInt32Type (void)
LLVMInt64Type (void)
LLVMInt128Type (void)
LLVMIntType (unsigned NumBits)
LLVMGetIntTypeWidth (LLVMTypeRef IntegerTy)
LLVMHalfTypeInContext (LLVMContextRef C)
Obtain a 16-bit floating point type from a context.
LLVMBFloatTypeInContext (LLVMContextRef C)
Obtain a 16-bit brain floating point type from a context.
LLVMFloatTypeInContext (LLVMContextRef C)
Obtain a 32-bit floating point type from a context.
LLVMDoubleTypeInContext (LLVMContextRef C)
Obtain a 64-bit floating point type from a context.
LLVMX86FP80TypeInContext (LLVMContextRef C)
Obtain a 80-bit floating point type (X87) from a context.
LLVMFP128TypeInContext (LLVMContextRef C)
Obtain a 128-bit floating point type (112-bit mantissa) from a context.
LLVMPPCFP128TypeInContext (LLVMContextRef C)
Obtain a 128-bit floating point type (two 64-bits) from a context.
LLVMX86AMXTypeInContext (LLVMContextRef C)
Create a X86 AMX type in a context.
LLVMHalfType (void)
LLVMBFloatType (void)
LLVMFloatType (void)
LLVMDoubleType (void)
LLVMX86FP80Type (void)
LLVMFP128Type (void)
LLVMPPCFP128Type (void)
LLVMX86AMXType (void)
LLVMFunctionType (LLVMTypeRef ReturnType, LLVMTypeRef *ParamTypes, unsigned ParamCount, LLVMBool IsVarArg)
Obtain a function type consisting of a specified signature.
LLVMIsFunctionVarArg (LLVMTypeRef FunctionTy)
Returns whether a function type is variadic.
LLVMGetReturnType (LLVMTypeRef FunctionTy)
Obtain the Type this function Type returns.
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.
LLVMStructTypeInContext (LLVMContextRef C, LLVMTypeRef *ElementTypes, unsigned ElementCount, LLVMBool Packed)
Create a new structure type in a context.
LLVMStructType (LLVMTypeRef *ElementTypes, unsigned ElementCount, LLVMBool Packed)
LLVMStructCreateNamed (LLVMContextRef C, const char *Name)
Create an empty structure in a context having a specified name.
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.
LLVMCountStructElementTypes (LLVMTypeRef StructTy)
Get the number of elements defined inside the structure.
void
LLVMGetStructElementTypes (LLVMTypeRef StructTy, LLVMTypeRef *Dest)
Get the elements within a structure.
LLVMStructGetTypeAtIndex (LLVMTypeRef StructTy, unsigned i)
Get the type of the element at a given index in the structure.
LLVMIsPackedStruct (LLVMTypeRef StructTy)
Determine whether a structure is packed.
LLVMIsOpaqueStruct (LLVMTypeRef StructTy)
Determine whether a structure is opaque.
LLVMIsLiteralStruct (LLVMTypeRef StructTy)
Determine whether a structure is literal.
LLVMGetTypeByName (LLVMModuleRef M, const char *Name)
Deprecated: Use LLVMGetTypeByName2 instead.
LLVMGetTypeByName2 (LLVMContextRef C, const char *Name)
Obtain a Type from a context by its registered name.
void
LLVMGetSubtypes (LLVMTypeRef Tp, LLVMTypeRef *Arr)
Returns type's subtypes.
LLVMArrayType (LLVMTypeRef ElementType, unsigned ElementCount)
Create a fixed size array type that refers to a specific type.
LLVMArrayType2 (LLVMTypeRef ElementType, uint64_t ElementCount)
Create a fixed size array type that refers to a specific type.
LLVMPointerType (LLVMTypeRef ElementType, unsigned AddressSpace)
Create a pointer type that points to a defined type.
LLVMPointerTypeIsOpaque (LLVMTypeRef Ty)
Determine whether a pointer is opaque.
LLVMVectorType (LLVMTypeRef ElementType, unsigned ElementCount)
Create a vector type that contains a defined type and has a specific number of elements.
LLVMScalableVectorType (LLVMTypeRef ElementType, unsigned ElementCount)
Create a vector type that contains a defined type and has a scalable number of elements.
LLVMGetElementType (LLVMTypeRef WrappedTy)
Obtain the element type of an array or vector type.
LLVMGetNumContainedTypes (LLVMTypeRef Tp)
Return the number of types in the derived type.
LLVMGetArrayLength (LLVMTypeRef ArrayTy)
Obtain the length of an array type.
LLVMGetArrayLength2 (LLVMTypeRef ArrayTy)
Obtain the length of an array type.
LLVMGetPointerAddressSpace (LLVMTypeRef PointerTy)
Obtain the address space of a pointer type.
LLVMGetVectorSize (LLVMTypeRef VectorTy)
Obtain the (possibly scalable) number of elements in a vector type.
LLVMGetConstantPtrAuthPointer (LLVMValueRef PtrAuth)
Get the pointer value for the associated ConstantPtrAuth constant.
LLVMGetConstantPtrAuthKey (LLVMValueRef PtrAuth)
Get the key value for the associated ConstantPtrAuth constant.
LLVMGetConstantPtrAuthDiscriminator (LLVMValueRef PtrAuth)
Get the discriminator value for the associated ConstantPtrAuth constant.
LLVMGetConstantPtrAuthAddrDiscriminator (LLVMValueRef PtrAuth)
Get the address discriminator value for the associated ConstantPtrAuth constant.
LLVMPointerTypeInContext (LLVMContextRef C, unsigned AddressSpace)
Create an opaque pointer type in a context.
LLVMVoidTypeInContext (LLVMContextRef C)
Create a void type in a context.
LLVMLabelTypeInContext (LLVMContextRef C)
Create a label type in a context.
LLVMTokenTypeInContext (LLVMContextRef C)
Create a token type in a context.
LLVMMetadataTypeInContext (LLVMContextRef C)
Create a metadata type in a context.
LLVMVoidType (void)
LLVMLabelType (void)
LLVMTargetExtTypeInContext (LLVMContextRef C, const char *Name, LLVMTypeRef *TypeParams, unsigned TypeParamCount, unsigned *IntParams, unsigned IntParamCount)
Create a target extension type in LLVM context.
LLVMGetTargetExtTypeName (LLVMTypeRef TargetExtTy)
Obtain the name for this target extension type.
LLVMGetTargetExtTypeNumTypeParams (LLVMTypeRef TargetExtTy)
Obtain the number of type parameters for this target extension type.
LLVMGetTargetExtTypeTypeParam (LLVMTypeRef TargetExtTy, unsigned Idx)
Get the type parameter at the given index for the target extension type.
LLVMGetTargetExtTypeNumIntParams (LLVMTypeRef TargetExtTy)
Obtain the number of int parameters for this target extension type.
LLVMGetTargetExtTypeIntParam (LLVMTypeRef TargetExtTy, unsigned Idx)
Get the int parameter at the given index for the target extension type.
LLVMTypeOf (LLVMValueRef Val)
Obtain the type of a value.
LLVMGetValueKind (LLVMValueRef Val)
Obtain the enumerated type of a Value instance.
LLVMGetValueName2 (LLVMValueRef Val, size_t *Length)
Obtain the string name of a value.
void
LLVMSetValueName2 (LLVMValueRef Val, const char *Name, size_t NameLen)
Set the string name of a value.
LLVMGetValueName (LLVMValueRef Val)
Deprecated: Use LLVMGetValueName2 instead.
void
LLVMSetValueName (LLVMValueRef Val, const char *Name)
Deprecated: Use LLVMSetValueName2 instead.
void
LLVMDumpValue (LLVMValueRef Val)
Dump a representation of a value to stderr.
char *
LLVMPrintValueToString (LLVMValueRef Val)
Return a string representation of the value.
LLVMGetValueContext (LLVMValueRef Val)
Obtain the context to which this value is associated.
char *
LLVMPrintDbgRecordToString (LLVMDbgRecordRef Record)
Return a string representation of the DbgRecord.
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.
LLVMGetMetadata (LLVMValueRef Inst, unsigned KindID)
Return metadata associated with an instruction value.
static MDNode *
extractMDNode (MetadataAsValue *MAV)
void
LLVMSetMetadata (LLVMValueRef Inst, unsigned KindID, LLVMValueRef Val)
Set metadata associated with an instruction value.
static LLVMValueMetadataEntry *
llvm_getMetadata (size_t *NumEntries, llvm::function_ref< void(MetadataEntries &)> AccessMD)
LLVMInstructionGetAllMetadataOtherThanDebugLoc (LLVMValueRef Value, size_t *NumEntries)
Returns the metadata associated with an instruction value, but filters out all the debug locations.
LLVMIsAMDNode (LLVMValueRef Val)
LLVMIsAValueAsMetadata (LLVMValueRef Val)
LLVMIsAMDString (LLVMValueRef Val)
LLVMGetFirstUse (LLVMValueRef Val)
Obtain the first use of a value.
Obtain the next use of a value.
Obtain the user value for a user.
LLVMGetUsedValue (LLVMUseRef U)
Obtain the value this use corresponds to.
static LLVMValueRef
getMDNodeOperandImpl (LLVMContext &Context, const MDNode *N, unsigned Index)
LLVMGetOperand (LLVMValueRef Val, unsigned Index)
Obtain an operand at a specific index in a llvm::User value.
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.
LLVMConstNull (LLVMTypeRef Ty)
Obtain a constant value referring to the null instance of a type.
LLVMConstAllOnes (LLVMTypeRef Ty)
Obtain a constant value referring to the instance of a type consisting of all ones.
LLVMGetUndef (LLVMTypeRef Ty)
Obtain a constant value referring to an undefined value of a type.
LLVMGetPoison (LLVMTypeRef Ty)
Obtain a constant value referring to a poison value of a type.
LLVMIsConstant (LLVMValueRef Ty)
Determine whether the specified value instance is constant.
LLVMIsNull (LLVMValueRef Val)
Determine whether a value instance is null.
LLVMIsUndef (LLVMValueRef Val)
Determine whether a value instance is undefined.
LLVMIsPoison (LLVMValueRef Val)
Determine whether a value instance is poisonous.
LLVMConstPointerNull (LLVMTypeRef Ty)
Obtain a constant that is a constant pointer pointing to NULL for a specified type.
LLVMMDStringInContext2 (LLVMContextRef C, const char *Str, size_t SLen)
Create an MDString value from a given string value.
LLVMMDNodeInContext2 (LLVMContextRef C, LLVMMetadataRef *MDs, size_t Count)
Create an MDNode value with the given array of operands.
LLVMMDStringInContext (LLVMContextRef C, const char *Str, unsigned SLen)
Deprecated: Use LLVMMDStringInContext2 instead.
LLVMMDString (const char *Str, unsigned SLen)
LLVMMDNodeInContext (LLVMContextRef C, LLVMValueRef *Vals, unsigned Count)
Deprecated: Use LLVMMDNodeInContext2 instead.
LLVMMDNode (LLVMValueRef *Vals, unsigned Count)
LLVMMetadataAsValue (LLVMContextRef C, LLVMMetadataRef MD)
Obtain a Metadata as a Value.
LLVMValueAsMetadata (LLVMValueRef Val)
Obtain a Value as a Metadata.
LLVMGetMDString (LLVMValueRef V, unsigned *Length)
Obtain the underlying string from a MDString value.
LLVMGetMDNodeNumOperands (LLVMValueRef V)
Obtain the number of operands from an MDNode value.
LLVMGetFirstNamedMetadata (LLVMModuleRef M)
Obtain an iterator to the first NamedMDNode in a Module.
LLVMGetLastNamedMetadata (LLVMModuleRef M)
Obtain an iterator to the last NamedMDNode in a Module.
LLVMGetNextNamedMetadata (LLVMNamedMDNodeRef NMD)
Advance a NamedMDNode iterator to the next NamedMDNode.
LLVMGetPreviousNamedMetadata (LLVMNamedMDNodeRef NMD)
Decrement a NamedMDNode iterator to the previous NamedMDNode.
LLVMGetNamedMetadata (LLVMModuleRef M, const char *Name, size_t NameLen)
Retrieve a NamedMDNode with the given name, returning NULL if no such node exists.
LLVMGetOrInsertNamedMetadata (LLVMModuleRef M, const char *Name, size_t NameLen)
Retrieve a NamedMDNode with the given name, creating a new node if no such node exists.
LLVMGetNamedMetadataName (LLVMNamedMDNodeRef NMD, size_t *NameLen)
Retrieve the name of a NamedMDNode.
void
LLVMGetMDNodeOperands (LLVMValueRef V, LLVMValueRef *Dest)
Obtain the given MDNode's operands.
void
LLVMReplaceMDNodeOperandWith (LLVMValueRef V, unsigned Index, LLVMMetadataRef Replacement)
Replace an operand at a specific index in a llvm::MDNode value.
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.
LLVMGetDebugLocDirectory (LLVMValueRef Val, unsigned *Length)
Return the directory of the debug location for this value, which must be an llvm::Instruction, llvm::GlobalVariable, or llvm::Function.
LLVMGetDebugLocFilename (LLVMValueRef Val, unsigned *Length)
Return the filename of the debug location for this value, which must be an llvm::Instruction, llvm::GlobalVariable, or llvm::Function.
LLVMGetDebugLocLine (LLVMValueRef Val)
Return the line number of the debug location for this value, which must be an llvm::Instruction, llvm::GlobalVariable, or llvm::Function.
LLVMGetDebugLocColumn (LLVMValueRef Val)
Return the column number of the debug location for this value, which must be an llvm::Instruction.
LLVMConstInt (LLVMTypeRef IntTy, unsigned long long N, LLVMBool SignExtend)
Obtain a constant value for an integer type.
LLVMConstIntOfArbitraryPrecision (LLVMTypeRef IntTy, unsigned NumWords, const uint64_t Words[])
Obtain a constant value for an integer of arbitrary precision.
LLVMConstIntOfString (LLVMTypeRef IntTy, const char Str[], uint8_t Radix)
LLVMConstIntOfStringAndSize (LLVMTypeRef IntTy, const char Str[], unsigned SLen, uint8_t Radix)
LLVMConstReal (LLVMTypeRef RealTy, double N)
Obtain a constant value referring to a double floating point value.
LLVMConstRealOfString (LLVMTypeRef RealTy, const char *Text)
Obtain a constant for a floating point value parsed from a string.
LLVMConstRealOfStringAndSize (LLVMTypeRef RealTy, const char Str[], unsigned SLen)
LLVMConstFPFromBits (LLVMTypeRef Ty, const uint64_t N[])
Obtain a constant for a floating point value from array of 64 bit values.
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.
LLVMConstStringInContext (LLVMContextRef C, const char *Str, unsigned Length, LLVMBool DontNullTerminate)
Create a ConstantDataSequential and initialize it with a string.
LLVMConstStringInContext2 (LLVMContextRef C, const char *Str, size_t Length, LLVMBool DontNullTerminate)
Create a ConstantDataSequential and initialize it with a string.
LLVMConstString (const char *Str, unsigned Length, LLVMBool DontNullTerminate)
LLVMGetAggregateElement (LLVMValueRef C, unsigned Idx)
Get element of a constant aggregate (struct, array or vector) at the specified index.
LLVMGetElementAsConstant (LLVMValueRef C, unsigned idx)
LLVMIsConstantString (LLVMValueRef C)
Returns true if the specified constant is an array of i8.
LLVMGetAsString (LLVMValueRef C, size_t *Length)
Get the given constant data sequential as a string.
LLVMGetRawDataValues (LLVMValueRef C, size_t *SizeInBytes)
Get the raw, underlying bytes of the given constant data sequential.
LLVMConstArray (LLVMTypeRef ElementTy, LLVMValueRef *ConstantVals, unsigned Length)
Create a ConstantArray from values.
LLVMConstArray2 (LLVMTypeRef ElementTy, LLVMValueRef *ConstantVals, uint64_t Length)
Create a ConstantArray from values.
LLVMConstDataArray (LLVMTypeRef ElementTy, const char *Data, size_t SizeInBytes)
Create a ConstantDataArray from raw values.
LLVMConstStructInContext (LLVMContextRef C, LLVMValueRef *ConstantVals, unsigned Count, LLVMBool Packed)
Create an anonymous ConstantStruct with the specified values.
LLVMConstStruct (LLVMValueRef *ConstantVals, unsigned Count, LLVMBool Packed)
LLVMConstNamedStruct (LLVMTypeRef StructTy, LLVMValueRef *ConstantVals, unsigned Count)
Create a non-anonymous ConstantStruct from values.
LLVMConstVector (LLVMValueRef *ScalarConstantVals, unsigned Size)
Create a ConstantVector from values.
LLVMConstantPtrAuth (LLVMValueRef Ptr, LLVMValueRef Key, LLVMValueRef Disc, LLVMValueRef AddrDisc)
Create a ConstantPtrAuth constant with the given values.
static LLVMOpcode
map_to_llvmopcode (int opcode)
static int
map_from_llvmopcode (LLVMOpcode code)
static GEPNoWrapFlags
mapFromLLVMGEPNoWrapFlags (LLVMGEPNoWrapFlags GEPFlags)
static LLVMGEPNoWrapFlags
mapToLLVMGEPNoWrapFlags (GEPNoWrapFlags GEPFlags)
LLVMGetConstOpcode (LLVMValueRef ConstantVal)
LLVMAlignOf (LLVMTypeRef Ty)
LLVMSizeOf (LLVMTypeRef Ty)
LLVMConstNeg (LLVMValueRef ConstantVal)
LLVMConstNSWNeg (LLVMValueRef ConstantVal)
LLVMConstNUWNeg (LLVMValueRef ConstantVal)
LLVMConstNot (LLVMValueRef ConstantVal)
LLVMConstAdd (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
LLVMConstNSWAdd (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
LLVMConstNUWAdd (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
LLVMConstSub (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
LLVMConstNSWSub (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
LLVMConstNUWSub (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
LLVMConstXor (LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
LLVMConstGEP2 (LLVMTypeRef Ty, LLVMValueRef ConstantVal, LLVMValueRef *ConstantIndices, unsigned NumIndices)
LLVMConstInBoundsGEP2 (LLVMTypeRef Ty, LLVMValueRef ConstantVal, LLVMValueRef *ConstantIndices, unsigned NumIndices)
LLVMConstGEPWithNoWrapFlags (LLVMTypeRef Ty, LLVMValueRef ConstantVal, LLVMValueRef *ConstantIndices, unsigned NumIndices, LLVMGEPNoWrapFlags NoWrapFlags)
Creates a constant GetElementPtr expression.
LLVMConstTrunc (LLVMValueRef ConstantVal, LLVMTypeRef ToType)
LLVMConstPtrToInt (LLVMValueRef ConstantVal, LLVMTypeRef ToType)
LLVMConstIntToPtr (LLVMValueRef ConstantVal, LLVMTypeRef ToType)
LLVMConstBitCast (LLVMValueRef ConstantVal, LLVMTypeRef ToType)
LLVMConstAddrSpaceCast (LLVMValueRef ConstantVal, LLVMTypeRef ToType)
LLVMConstTruncOrBitCast (LLVMValueRef ConstantVal, LLVMTypeRef ToType)
LLVMConstPointerCast (LLVMValueRef ConstantVal, LLVMTypeRef ToType)
LLVMConstExtractElement (LLVMValueRef VectorConstant, LLVMValueRef IndexConstant)
LLVMConstInsertElement (LLVMValueRef VectorConstant, LLVMValueRef ElementValueConstant, LLVMValueRef IndexConstant)
LLVMConstShuffleVector (LLVMValueRef VectorAConstant, LLVMValueRef VectorBConstant, LLVMValueRef MaskConstant)
LLVMConstInlineAsm (LLVMTypeRef Ty, const char *AsmString, const char *Constraints, LLVMBool HasSideEffects, LLVMBool IsAlignStack)
Deprecated: Use LLVMGetInlineAsm instead.
LLVMBlockAddress (LLVMValueRef F, LLVMBasicBlockRef BB)
LLVMGetBlockAddressFunction (LLVMValueRef BlockAddr)
Gets the function associated with a given BlockAddress constant value.
LLVMGetBlockAddressBasicBlock (LLVMValueRef BlockAddr)
Gets the basic block associated with a given BlockAddress constant value.
LLVMGetGlobalParent (LLVMValueRef Global)
LLVMIsDeclaration (LLVMValueRef Global)
LLVMGetLinkage (LLVMValueRef Global)
void
LLVMSetLinkage (LLVMValueRef Global, LLVMLinkage Linkage)
LLVMGetSection (LLVMValueRef Global)
void
LLVMSetSection (LLVMValueRef Global, const char *Section)
LLVMGetVisibility (LLVMValueRef Global)
void
LLVMSetVisibility (LLVMValueRef Global, LLVMVisibility Viz)
LLVMGetDLLStorageClass (LLVMValueRef Global)
void
LLVMSetDLLStorageClass (LLVMValueRef Global, LLVMDLLStorageClass Class)
LLVMGetUnnamedAddress (LLVMValueRef Global)
void
LLVMSetUnnamedAddress (LLVMValueRef Global, LLVMUnnamedAddr UnnamedAddr)
LLVMHasUnnamedAddr (LLVMValueRef Global)
Deprecated: Use LLVMGetUnnamedAddress instead.
void
LLVMSetUnnamedAddr (LLVMValueRef Global, LLVMBool HasUnnamedAddr)
Deprecated: Use LLVMSetUnnamedAddress instead.
LLVMGlobalGetValueType (LLVMValueRef Global)
Returns the "value type" of a global value.
LLVMGetAlignment (LLVMValueRef V)
Obtain the preferred alignment of the value.
void
LLVMSetAlignment (LLVMValueRef V, unsigned Bytes)
Set the preferred alignment of the value.
LLVMGlobalCopyAllMetadata (LLVMValueRef Value, size_t *NumEntries)
Retrieves an array of metadata entries representing the metadata attached to this value.
LLVMValueMetadataEntriesGetKind (LLVMValueMetadataEntry *Entries, unsigned Index)
Returns the kind of a value metadata entry at a specific index.
LLVMValueMetadataEntriesGetMetadata (LLVMValueMetadataEntry *Entries, unsigned Index)
Returns the underlying metadata node of a value metadata entry at a specific index.
void
LLVMDisposeValueMetadataEntries (LLVMValueMetadataEntry *Entries)
Destroys value metadata entries.
void
LLVMGlobalSetMetadata (LLVMValueRef Global, unsigned Kind, LLVMMetadataRef MD)
Sets a metadata attachment, erasing the existing metadata attachment if it already exists for the given kind.
void
LLVMGlobalAddMetadata (LLVMValueRef Global, unsigned Kind, LLVMMetadataRef MD)
Adds a metadata attachment.
void
LLVMGlobalEraseMetadata (LLVMValueRef Global, unsigned Kind)
Erases a metadata attachment of the given kind if it exists.
void
LLVMGlobalClearMetadata (LLVMValueRef Global)
Removes all metadata attachments from this value.
void
LLVMGlobalAddDebugInfo (LLVMValueRef Global, LLVMMetadataRef GVE)
Add debuginfo metadata to this global.
LLVMAddGlobal (LLVMModuleRef M, LLVMTypeRef Ty, const char *Name)
LLVMAddGlobalInAddressSpace (LLVMModuleRef M, LLVMTypeRef Ty, const char *Name, unsigned AddressSpace)
LLVMGetNamedGlobal (LLVMModuleRef M, const char *Name)
LLVMGetNamedGlobalWithLength (LLVMModuleRef M, const char *Name, size_t Length)
LLVMGetFirstGlobal (LLVMModuleRef M)
LLVMGetLastGlobal (LLVMModuleRef M)
LLVMGetNextGlobal (LLVMValueRef GlobalVar)
LLVMGetPreviousGlobal (LLVMValueRef GlobalVar)
void
LLVMDeleteGlobal (LLVMValueRef GlobalVar)
LLVMGetInitializer (LLVMValueRef GlobalVar)
void
LLVMSetInitializer (LLVMValueRef GlobalVar, LLVMValueRef ConstantVal)
LLVMIsThreadLocal (LLVMValueRef GlobalVar)
void
LLVMSetThreadLocal (LLVMValueRef GlobalVar, LLVMBool IsThreadLocal)
LLVMIsGlobalConstant (LLVMValueRef GlobalVar)
void
LLVMSetGlobalConstant (LLVMValueRef GlobalVar, LLVMBool IsConstant)
LLVMGetThreadLocalMode (LLVMValueRef GlobalVar)
void
LLVMSetThreadLocalMode (LLVMValueRef GlobalVar, LLVMThreadLocalMode Mode)
LLVMIsExternallyInitialized (LLVMValueRef GlobalVar)
void
LLVMSetExternallyInitialized (LLVMValueRef GlobalVar, LLVMBool IsExtInit)
LLVMAddAlias2 (LLVMModuleRef M, LLVMTypeRef ValueTy, unsigned AddrSpace, LLVMValueRef Aliasee, const char *Name)
Add a GlobalAlias with the given value type, address space and aliasee.
LLVMGetNamedGlobalAlias (LLVMModuleRef M, const char *Name, size_t NameLen)
Obtain a GlobalAlias value from a Module by its name.
LLVMGetFirstGlobalAlias (LLVMModuleRef M)
Obtain an iterator to the first GlobalAlias in a Module.
LLVMGetLastGlobalAlias (LLVMModuleRef M)
Obtain an iterator to the last GlobalAlias in a Module.
LLVMGetNextGlobalAlias (LLVMValueRef GA)
Advance a GlobalAlias iterator to the next GlobalAlias.
LLVMGetPreviousGlobalAlias (LLVMValueRef GA)
Decrement a GlobalAlias iterator to the previous GlobalAlias.
LLVMAliasGetAliasee (LLVMValueRef Alias)
Retrieve the target value of an alias.
void
LLVMAliasSetAliasee (LLVMValueRef Alias, LLVMValueRef Aliasee)
Set the target value of an alias.
LLVMAddFunction (LLVMModuleRef M, const char *Name, LLVMTypeRef FunctionTy)
Add a function to a module under a specified name.
LLVMGetOrInsertFunction (LLVMModuleRef M, const char *Name, size_t NameLen, LLVMTypeRef FunctionTy)
Obtain or insert a function into a module.
LLVMGetNamedFunction (LLVMModuleRef M, const char *Name)
Obtain a Function value from a Module by its name.
LLVMGetNamedFunctionWithLength (LLVMModuleRef M, const char *Name, size_t Length)
Obtain a Function value from a Module by its name.
LLVMGetFirstFunction (LLVMModuleRef M)
Obtain an iterator to the first Function in a Module.
LLVMGetLastFunction (LLVMModuleRef M)
Obtain an iterator to the last Function in a Module.
LLVMGetNextFunction (LLVMValueRef Fn)
Advance a Function iterator to the next Function.
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.
LLVMHasPersonalityFn (LLVMValueRef Fn)
Check whether the given function has a personality function.
LLVMGetPersonalityFn (LLVMValueRef Fn)
Obtain the personality function attached to the function.
void
LLVMSetPersonalityFn (LLVMValueRef Fn, LLVMValueRef PersonalityFn)
Set the personality function attached to the function.
LLVMGetIntrinsicID (LLVMValueRef Fn)
Obtain the ID number from a function instance.
static Intrinsic::ID
llvm_map_to_intrinsic_id (unsigned ID)
LLVMGetIntrinsicDeclaration (LLVMModuleRef Mod, unsigned ID, LLVMTypeRef *ParamTypes, size_t ParamCount)
Get or insert the declaration of an intrinsic.
LLVMIntrinsicGetName (unsigned ID, size_t *NameLength)
Retrieves the name of an intrinsic.
LLVMIntrinsicGetType (LLVMContextRef Ctx, unsigned ID, LLVMTypeRef *ParamTypes, size_t ParamCount)
Retrieves the type of an intrinsic.
char *
LLVMIntrinsicCopyOverloadedName (unsigned ID, LLVMTypeRef *ParamTypes, size_t ParamCount, size_t *NameLength)
Deprecated: Use LLVMIntrinsicCopyOverloadedName2 instead.
char *
LLVMIntrinsicCopyOverloadedName2 (LLVMModuleRef Mod, unsigned ID, LLVMTypeRef *ParamTypes, size_t ParamCount, size_t *NameLength)
Copies the name of an overloaded intrinsic identified by a given list of parameter types.
LLVMLookupIntrinsicID (const char *Name, size_t NameLen)
Obtain the intrinsic ID number which matches the given function name.
LLVMIntrinsicIsOverloaded (unsigned ID)
Obtain if the intrinsic identified by the given ID is overloaded.
LLVMGetFunctionCallConv (LLVMValueRef Fn)
Obtain the calling function of a function.
void
LLVMSetFunctionCallConv (LLVMValueRef Fn, unsigned CC)
Set the calling convention of a function.
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.
LLVMGetPrefixData (LLVMValueRef Fn)
Gets the prefix data associated with a function.
LLVMHasPrefixData (LLVMValueRef Fn)
Check if a given function has prefix data.
void
LLVMSetPrefixData (LLVMValueRef Fn, LLVMValueRef prefixData)
Sets the prefix data for the function.
LLVMGetPrologueData (LLVMValueRef Fn)
Gets the prologue data associated with a function.
LLVMHasPrologueData (LLVMValueRef Fn)
Check if a given function has prologue data.
void
LLVMSetPrologueData (LLVMValueRef Fn, LLVMValueRef prologueData)
Sets the prologue data for the function.
void
LLVMAddAttributeAtIndex (LLVMValueRef F, LLVMAttributeIndex Idx, LLVMAttributeRef A)
Add an attribute to a function.
LLVMGetAttributeCountAtIndex (LLVMValueRef F, LLVMAttributeIndex Idx)
void
LLVMGetAttributesAtIndex (LLVMValueRef F, LLVMAttributeIndex Idx, LLVMAttributeRef *Attrs)
LLVMGetEnumAttributeAtIndex (LLVMValueRef F, LLVMAttributeIndex Idx, unsigned KindID)
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)
Add a target-dependent attribute to a function.
LLVMCountParams (LLVMValueRef FnRef)
Obtain the number of parameters in a function.
void
LLVMGetParams (LLVMValueRef FnRef, LLVMValueRef *ParamRefs)
Obtain the parameters in a function.
LLVMGetParam (LLVMValueRef FnRef, unsigned index)
Obtain the parameter at the specified index.
LLVMGetParamParent (LLVMValueRef V)
Obtain the function to which this argument belongs.
LLVMGetFirstParam (LLVMValueRef Fn)
Obtain the first parameter to a function.
LLVMGetLastParam (LLVMValueRef Fn)
Obtain the last parameter to a function.
LLVMGetNextParam (LLVMValueRef Arg)
Obtain the next parameter to a function.
LLVMGetPreviousParam (LLVMValueRef Arg)
Obtain the previous parameter to a function.
void
LLVMSetParamAlignment (LLVMValueRef Arg, unsigned align)
Set the alignment for a function parameter.
LLVMAddGlobalIFunc (LLVMModuleRef M, const char *Name, size_t NameLen, LLVMTypeRef Ty, unsigned AddrSpace, LLVMValueRef Resolver)
Add a global indirect function to a module under a specified name.
LLVMGetNamedGlobalIFunc (LLVMModuleRef M, const char *Name, size_t NameLen)
Obtain a GlobalIFunc value from a Module by its name.
LLVMGetFirstGlobalIFunc (LLVMModuleRef M)
Obtain an iterator to the first GlobalIFunc in a Module.
LLVMGetLastGlobalIFunc (LLVMModuleRef M)
Obtain an iterator to the last GlobalIFunc in a Module.
LLVMGetNextGlobalIFunc (LLVMValueRef IFunc)
Advance a GlobalIFunc iterator to the next GlobalIFunc.
LLVMGetPreviousGlobalIFunc (LLVMValueRef IFunc)
Decrement a GlobalIFunc iterator to the previous GlobalIFunc.
LLVMGetGlobalIFuncResolver (LLVMValueRef IFunc)
Retrieves the resolver function associated with this indirect function, or NULL if it doesn't not exist.
void
LLVMSetGlobalIFuncResolver (LLVMValueRef IFunc, LLVMValueRef Resolver)
Sets the resolver function associated with this indirect function.
void
LLVMEraseGlobalIFunc (LLVMValueRef IFunc)
Remove a global indirect function from its parent module and delete it.
void
LLVMRemoveGlobalIFunc (LLVMValueRef IFunc)
Remove a global indirect function from its parent module.
LLVMCreateOperandBundle (const char *Tag, size_t TagLen, LLVMValueRef *Args, unsigned NumArgs)
Create a new operand bundle.
void
LLVMDisposeOperandBundle (LLVMOperandBundleRef Bundle)
Destroy an operand bundle.
LLVMGetOperandBundleTag (LLVMOperandBundleRef Bundle, size_t *Len)
Obtain the tag of an operand bundle as a string.
LLVMGetNumOperandBundleArgs (LLVMOperandBundleRef Bundle)
Obtain the number of operands for an operand bundle.
LLVMGetOperandBundleArgAtIndex (LLVMOperandBundleRef Bundle, unsigned Index)
Obtain the operand for an operand bundle at the given index.
LLVMBasicBlockAsValue (LLVMBasicBlockRef BB)
Convert a basic block instance to a value type.
LLVMValueIsBasicBlock (LLVMValueRef Val)
Determine whether an LLVMValueRef is itself a basic block.
LLVMValueAsBasicBlock (LLVMValueRef Val)
Convert an LLVMValueRef to an LLVMBasicBlockRef instance.
LLVMGetBasicBlockName (LLVMBasicBlockRef BB)
Obtain the string name of a basic block.
LLVMGetBasicBlockParent (LLVMBasicBlockRef BB)
Obtain the function to which a basic block belongs.
LLVMGetBasicBlockTerminator (LLVMBasicBlockRef BB)
Obtain the terminator instruction for a basic block.
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.
LLVMGetEntryBasicBlock (LLVMValueRef Fn)
Obtain the basic block that corresponds to the entry point of a function.
LLVMGetFirstBasicBlock (LLVMValueRef Fn)
Obtain the first basic block in a function.
LLVMGetLastBasicBlock (LLVMValueRef Fn)
Obtain the last basic block in a function.
LLVMGetNextBasicBlock (LLVMBasicBlockRef BB)
Advance a basic block iterator.
LLVMGetPreviousBasicBlock (LLVMBasicBlockRef BB)
Go backwards in a basic block iterator.
LLVMCreateBasicBlockInContext (LLVMContextRef C, const char *Name)
Create a new basic block without inserting it into a function.
void
LLVMInsertExistingBasicBlockAfterInsertBlock (LLVMBuilderRef Builder, LLVMBasicBlockRef BB)
Insert the given basic block after the insertion point of the given builder.
void
LLVMAppendExistingBasicBlock (LLVMValueRef Fn, LLVMBasicBlockRef BB)
Append the given basic block to the basic block list of the given function.
LLVMAppendBasicBlockInContext (LLVMContextRef C, LLVMValueRef FnRef, const char *Name)
Append a basic block to the end of a function.
LLVMAppendBasicBlock (LLVMValueRef FnRef, const char *Name)
LLVMInsertBasicBlockInContext (LLVMContextRef C, LLVMBasicBlockRef BBRef, const char *Name)
Insert a basic block in a function before another basic block.
LLVMInsertBasicBlock (LLVMBasicBlockRef BBRef, const char *Name)
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.
LLVMGetInstructionParent (LLVMValueRef Inst)
Obtain the basic block to which an instruction belongs.
LLVMGetFirstInstruction (LLVMBasicBlockRef BB)
Obtain the first instruction in a basic block.
LLVMGetLastInstruction (LLVMBasicBlockRef BB)
Obtain the last instruction in a basic block.
LLVMGetNextInstruction (LLVMValueRef Inst)
Obtain the instruction that occurs after the one specified.
LLVMGetPreviousInstruction (LLVMValueRef Inst)
Obtain the instruction that occurred before this one.
void
LLVMInstructionRemoveFromParent (LLVMValueRef Inst)
Remove an instruction.
void
LLVMInstructionEraseFromParent (LLVMValueRef Inst)
Remove and delete an instruction.
void
LLVMDeleteInstruction (LLVMValueRef Inst)
Delete an instruction.
LLVMGetICmpPredicate (LLVMValueRef Inst)
Obtain the predicate of an instruction.
LLVMGetICmpSameSign (LLVMValueRef Inst)
Get whether or not an icmp instruction has the samesign flag.
void
LLVMSetICmpSameSign (LLVMValueRef Inst, LLVMBool SameSign)
Set the samesign flag on an icmp instruction.
LLVMGetFCmpPredicate (LLVMValueRef Inst)
Obtain the float predicate of an instruction.
LLVMGetInstructionOpcode (LLVMValueRef Inst)
Obtain the code opcode for an individual instruction.
LLVMInstructionClone (LLVMValueRef Inst)
Create a copy of 'this' instruction that is identical in all ways except the following:
LLVMIsATerminatorInst (LLVMValueRef Inst)
Determine whether an instruction is a terminator.
LLVMGetFirstDbgRecord (LLVMValueRef Inst)
Obtain the first debug record attached to an instruction.
LLVMGetLastDbgRecord (LLVMValueRef Inst)
Obtain the last debug record attached to an instruction.
LLVMGetNextDbgRecord (LLVMDbgRecordRef Rec)
Obtain the next DbgRecord in the sequence or NULL if there are no more.
LLVMGetPreviousDbgRecord (LLVMDbgRecordRef Rec)
Obtain the previous DbgRecord in the sequence or NULL if there are no more.
LLVMDbgRecordGetDebugLoc (LLVMDbgRecordRef Rec)
Get the debug location attached to the debug record.
LLVMDbgRecordGetKind (LLVMDbgRecordRef Rec)
LLVMDbgVariableRecordGetValue (LLVMDbgRecordRef Rec, unsigned OpIdx)
Get the value of the DbgVariableRecord.
LLVMDbgVariableRecordGetVariable (LLVMDbgRecordRef Rec)
Get the debug info variable of the DbgVariableRecord.
LLVMDbgVariableRecordGetExpression (LLVMDbgRecordRef Rec)
Get the debug info expression of the DbgVariableRecord.
LLVMGetNumArgOperands (LLVMValueRef Instr)
Obtain the argument count for a call instruction.
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
LLVMSetInstrParamAlignment (LLVMValueRef Instr, LLVMAttributeIndex Idx, unsigned align)
void
LLVMAddCallSiteAttribute (LLVMValueRef C, LLVMAttributeIndex Idx, LLVMAttributeRef A)
LLVMGetCallSiteAttributeCount (LLVMValueRef C, LLVMAttributeIndex Idx)
void
LLVMGetCallSiteAttributes (LLVMValueRef C, LLVMAttributeIndex Idx, LLVMAttributeRef *Attrs)
LLVMGetCallSiteEnumAttribute (LLVMValueRef C, LLVMAttributeIndex Idx, unsigned KindID)
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)
LLVMGetCalledValue (LLVMValueRef Instr)
Obtain the pointer to the function invoked by this instruction.
LLVMGetCalledFunctionType (LLVMValueRef Instr)
Obtain the function type called by this instruction.
LLVMGetNumOperandBundles (LLVMValueRef C)
Obtain the number of operand bundles attached to this instruction.
LLVMGetOperandBundleAtIndex (LLVMValueRef C, unsigned Index)
Obtain the operand bundle attached to this instruction at the given index.
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.
LLVMGetTailCallKind (LLVMValueRef Call)
Obtain a tail call kind of the call instruction.
void
LLVMSetTailCallKind (LLVMValueRef Call, LLVMTailCallKind kind)
Set the call kind of the call instruction.
LLVMGetNormalDest (LLVMValueRef Invoke)
Return the normal destination basic block.
LLVMGetUnwindDest (LLVMValueRef Invoke)
Return the unwind destination basic block.
void
LLVMSetNormalDest (LLVMValueRef Invoke, LLVMBasicBlockRef B)
Set the normal destination basic block.
void
LLVMSetUnwindDest (LLVMValueRef Invoke, LLVMBasicBlockRef B)
Set the unwind destination basic block.
LLVMGetCallBrDefaultDest (LLVMValueRef CallBr)
Get the default destination of a CallBr instruction.
LLVMGetCallBrNumIndirectDests (LLVMValueRef CallBr)
Get the number of indirect destinations of a CallBr instruction.
LLVMGetCallBrIndirectDest (LLVMValueRef CallBr, unsigned Idx)
Get the indirect destination of a CallBr instruction at the given index.
LLVMGetNumSuccessors (LLVMValueRef Term)
Return the number of successors that this terminator has.
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.
LLVMIsConditional (LLVMValueRef Branch)
Return if a branch is conditional.
LLVMGetCondition (LLVMValueRef Branch)
Return the condition of a branch instruction.
void
LLVMSetCondition (LLVMValueRef Branch, LLVMValueRef Cond)
Set the condition of a branch instruction.
LLVMGetSwitchDefaultDest (LLVMValueRef Switch)
Obtain the default destination basic block of a switch instruction.
LLVMGetAllocatedType (LLVMValueRef Alloca)
Obtain the type that is being allocated by the alloca instruction.
LLVMIsInBounds (LLVMValueRef GEP)
Check whether the given GEP operator is inbounds.
void
LLVMSetIsInBounds (LLVMValueRef GEP, LLVMBool InBounds)
Set the given GEP instruction to be inbounds or not.
LLVMGetGEPSourceElementType (LLVMValueRef GEP)
Get the source element type of the given GEP operator.
LLVMGEPGetNoWrapFlags (LLVMValueRef GEP)
Get the no-wrap related flags for the given GEP instruction.
void
LLVMGEPSetNoWrapFlags (LLVMValueRef GEP, LLVMGEPNoWrapFlags NoWrapFlags)
Set the no-wrap related flags for the given GEP instruction.
void
LLVMAddIncoming (LLVMValueRef PhiNode, LLVMValueRef *IncomingValues, LLVMBasicBlockRef *IncomingBlocks, unsigned Count)
Add an incoming value to the end of a PHI list.
LLVMCountIncoming (LLVMValueRef PhiNode)
Obtain the number of incoming basic blocks to a PHI node.
LLVMGetIncomingValue (LLVMValueRef PhiNode, unsigned Index)
Obtain an incoming value to a PHI node as an LLVMValueRef.
LLVMGetIncomingBlock (LLVMValueRef PhiNode, unsigned Index)
Obtain an incoming value to a PHI node as an LLVMBasicBlockRef.
LLVMGetNumIndices (LLVMValueRef Inst)
Obtain the number of indices.
LLVMGetIndices (LLVMValueRef Inst)
Obtain the indices as an array.
LLVMCreateBuilderInContext (LLVMContextRef C)
LLVMCreateBuilder (void)
static void
LLVMPositionBuilderImpl (IRBuilder<> *Builder, BasicBlock *Block, Instruction *Instr, bool BeforeDbgRecords)
void
LLVMPositionBuilder (LLVMBuilderRef Builder, LLVMBasicBlockRef Block, LLVMValueRef Instr)
Set the builder position before Instr but after any attached debug records, or if Instr is null set the position to the end of Block.
void
LLVMPositionBuilderBeforeDbgRecords (LLVMBuilderRef Builder, LLVMBasicBlockRef Block, LLVMValueRef Instr)
Set the builder position before Instr and any attached debug records, or if Instr is null set the position to the end of Block.
void
LLVMPositionBuilderBefore (LLVMBuilderRef Builder, LLVMValueRef Instr)
Set the builder position before Instr but after any attached debug records.
void
LLVMPositionBuilderBeforeInstrAndDbgRecords (LLVMBuilderRef Builder, LLVMValueRef Instr)
Set the builder position before Instr and any attached debug records.
void
LLVMPositionBuilderAtEnd (LLVMBuilderRef Builder, LLVMBasicBlockRef Block)
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)
LLVMGetCurrentDebugLocation2 (LLVMBuilderRef Builder)
Get location information used by debugging information.
void
LLVMSetCurrentDebugLocation2 (LLVMBuilderRef Builder, LLVMMetadataRef Loc)
Set location information used by debugging information.
void
LLVMSetCurrentDebugLocation (LLVMBuilderRef Builder, LLVMValueRef L)
Deprecated: Passing the NULL location will crash.
LLVMGetCurrentDebugLocation (LLVMBuilderRef Builder)
Deprecated: Returning the NULL location will crash.
void
LLVMSetInstDebugLocation (LLVMBuilderRef Builder, LLVMValueRef Inst)
Attempts to set the debug location for the given instruction using the current debug location for the given builder.
void
LLVMAddMetadataToInst (LLVMBuilderRef Builder, LLVMValueRef Inst)
Adds the metadata registered with the given builder to the given instruction.
void
LLVMBuilderSetDefaultFPMathTag (LLVMBuilderRef Builder, LLVMMetadataRef FPMathTag)
Set the default floating-point math metadata for the given builder.
LLVMGetBuilderContext (LLVMBuilderRef Builder)
Obtain the context to which this builder is associated.
LLVMBuilderGetDefaultFPMathTag (LLVMBuilderRef Builder)
Get the dafult floating-point math metadata for a given builder.
LLVMBuildRetVoid (LLVMBuilderRef B)
LLVMBuildRet (LLVMBuilderRef B, LLVMValueRef V)
LLVMBuildAggregateRet (LLVMBuilderRef B, LLVMValueRef *RetVals, unsigned N)
LLVMBuildBr (LLVMBuilderRef B, LLVMBasicBlockRef Dest)
LLVMBuildCondBr (LLVMBuilderRef B, LLVMValueRef If, LLVMBasicBlockRef Then, LLVMBasicBlockRef Else)
LLVMBuildSwitch (LLVMBuilderRef B, LLVMValueRef V, LLVMBasicBlockRef Else, unsigned NumCases)
LLVMBuildIndirectBr (LLVMBuilderRef B, LLVMValueRef Addr, unsigned NumDests)
LLVMBuildCallBr (LLVMBuilderRef B, LLVMTypeRef Ty, LLVMValueRef Fn, LLVMBasicBlockRef DefaultDest, LLVMBasicBlockRef *IndirectDests, unsigned NumIndirectDests, LLVMValueRef *Args, unsigned NumArgs, LLVMOperandBundleRef *Bundles, unsigned NumBundles, const char *Name)
LLVMBuildInvoke2 (LLVMBuilderRef B, LLVMTypeRef Ty, LLVMValueRef Fn, LLVMValueRef *Args, unsigned NumArgs, LLVMBasicBlockRef Then, LLVMBasicBlockRef Catch, const char *Name)
LLVMBuildInvokeWithOperandBundles (LLVMBuilderRef B, LLVMTypeRef Ty, LLVMValueRef Fn, LLVMValueRef *Args, unsigned NumArgs, LLVMBasicBlockRef Then, LLVMBasicBlockRef Catch, LLVMOperandBundleRef *Bundles, unsigned NumBundles, const char *Name)
LLVMBuildLandingPad (LLVMBuilderRef B, LLVMTypeRef Ty, LLVMValueRef PersFn, unsigned NumClauses, const char *Name)
LLVMBuildCatchPad (LLVMBuilderRef B, LLVMValueRef ParentPad, LLVMValueRef *Args, unsigned NumArgs, const char *Name)
LLVMBuildCleanupPad (LLVMBuilderRef B, LLVMValueRef ParentPad, LLVMValueRef *Args, unsigned NumArgs, const char *Name)
LLVMBuildResume (LLVMBuilderRef B, LLVMValueRef Exn)
LLVMBuildCatchSwitch (LLVMBuilderRef B, LLVMValueRef ParentPad, LLVMBasicBlockRef UnwindBB, unsigned NumHandlers, const char *Name)
LLVMBuildCatchRet (LLVMBuilderRef B, LLVMValueRef CatchPad, LLVMBasicBlockRef BB)
LLVMBuildCleanupRet (LLVMBuilderRef B, LLVMValueRef CatchPad, LLVMBasicBlockRef BB)
LLVMBuildUnreachable (LLVMBuilderRef B)
void
LLVMAddCase (LLVMValueRef Switch, LLVMValueRef OnVal, LLVMBasicBlockRef Dest)
void
LLVMAddDestination (LLVMValueRef IndirectBr, LLVMBasicBlockRef Dest)
LLVMGetNumClauses (LLVMValueRef LandingPad)
LLVMGetClause (LLVMValueRef LandingPad, unsigned Idx)
void
LLVMAddClause (LLVMValueRef LandingPad, LLVMValueRef ClauseVal)
LLVMIsCleanup (LLVMValueRef LandingPad)
void
LLVMSetCleanup (LLVMValueRef LandingPad, LLVMBool Val)
void
LLVMAddHandler (LLVMValueRef CatchSwitch, LLVMBasicBlockRef Dest)
LLVMGetNumHandlers (LLVMValueRef CatchSwitch)
void
LLVMGetHandlers (LLVMValueRef CatchSwitch, LLVMBasicBlockRef *Handlers)
Obtain the basic blocks acting as handlers for a catchswitch instruction.
LLVMGetParentCatchSwitch (LLVMValueRef CatchPad)
Get the parent catchswitch instruction of a catchpad instruction.
void
LLVMSetParentCatchSwitch (LLVMValueRef CatchPad, LLVMValueRef CatchSwitch)
Set the parent catchswitch instruction of a catchpad instruction.
LLVMGetArgOperand (LLVMValueRef Funclet, unsigned i)
void
LLVMSetArgOperand (LLVMValueRef Funclet, unsigned i, LLVMValueRef value)
static FastMathFlags
mapFromLLVMFastMathFlags (LLVMFastMathFlags FMF)
static LLVMFastMathFlags
mapToLLVMFastMathFlags (FastMathFlags FMF)
LLVMBuildAdd (LLVMBuilderRef B, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
LLVMBuildNSWAdd (LLVMBuilderRef B, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
LLVMBuildNUWAdd (LLVMBuilderRef B, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
LLVMBuildFAdd (LLVMBuilderRef B, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
LLVMBuildSub (LLVMBuilderRef B, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
LLVMBuildNSWSub (LLVMBuilderRef B, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
LLVMBuildNUWSub (LLVMBuilderRef B, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
LLVMBuildFSub (LLVMBuilderRef B, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
LLVMBuildMul (LLVMBuilderRef B, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
LLVMBuildNSWMul (LLVMBuilderRef B, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
LLVMBuildNUWMul (LLVMBuilderRef B, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
LLVMBuildFMul (LLVMBuilderRef B, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
LLVMBuildUDiv (LLVMBuilderRef B, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
LLVMBuildExactUDiv (LLVMBuilderRef B, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
LLVMBuildSDiv (LLVMBuilderRef B, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
LLVMBuildExactSDiv (LLVMBuilderRef B, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
LLVMBuildFDiv (LLVMBuilderRef B, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
LLVMBuildURem (LLVMBuilderRef B, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
LLVMBuildSRem (LLVMBuilderRef B, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
LLVMBuildFRem (LLVMBuilderRef B, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
LLVMBuildShl (LLVMBuilderRef B, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
LLVMBuildLShr (LLVMBuilderRef B, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
LLVMBuildAShr (LLVMBuilderRef B, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
LLVMBuildAnd (LLVMBuilderRef B, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
LLVMBuildOr (LLVMBuilderRef B, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
LLVMBuildXor (LLVMBuilderRef B, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
LLVMBuildBinOp (LLVMBuilderRef B, LLVMOpcode Op, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
LLVMBuildNeg (LLVMBuilderRef B, LLVMValueRef V, const char *Name)
LLVMBuildNSWNeg (LLVMBuilderRef B, LLVMValueRef V, const char *Name)
LLVMBuildNUWNeg (LLVMBuilderRef B, LLVMValueRef V, const char *Name)
LLVMBuildFNeg (LLVMBuilderRef B, LLVMValueRef V, const char *Name)
LLVMBuildNot (LLVMBuilderRef B, LLVMValueRef V, const char *Name)
LLVMGetNUW (LLVMValueRef ArithInst)
void
LLVMSetNUW (LLVMValueRef ArithInst, LLVMBool HasNUW)
LLVMGetNSW (LLVMValueRef ArithInst)
void
LLVMSetNSW (LLVMValueRef ArithInst, LLVMBool HasNSW)
LLVMGetExact (LLVMValueRef DivOrShrInst)
void
LLVMSetExact (LLVMValueRef DivOrShrInst, LLVMBool IsExact)
LLVMGetNNeg (LLVMValueRef NonNegInst)
Gets if the instruction has the non-negative flag set.
void
LLVMSetNNeg (LLVMValueRef NonNegInst, LLVMBool IsNonNeg)
Sets the non-negative flag for the instruction.
LLVMGetFastMathFlags (LLVMValueRef FPMathInst)
Get the flags for which fast-math-style optimizations are allowed for this value.
void
LLVMSetFastMathFlags (LLVMValueRef FPMathInst, LLVMFastMathFlags FMF)
Sets the flags for which fast-math-style optimizations are allowed for this value.
LLVMCanValueUseFastMathFlags (LLVMValueRef V)
Check if a given value can potentially have fast math flags.
LLVMGetIsDisjoint (LLVMValueRef Inst)
Gets whether the instruction has the disjoint flag set.
void
LLVMSetIsDisjoint (LLVMValueRef Inst, LLVMBool IsDisjoint)
Sets the disjoint flag for the instruction.
LLVMBuildMalloc (LLVMBuilderRef B, LLVMTypeRef Ty, const char *Name)
LLVMBuildArrayMalloc (LLVMBuilderRef B, LLVMTypeRef Ty, LLVMValueRef Val, const char *Name)
LLVMBuildMemSet (LLVMBuilderRef B, LLVMValueRef Ptr, LLVMValueRef Val, LLVMValueRef Len, unsigned Align)
Creates and inserts a memset to the specified pointer and the specified value.
LLVMBuildMemCpy (LLVMBuilderRef B, LLVMValueRef Dst, unsigned DstAlign, LLVMValueRef Src, unsigned SrcAlign, LLVMValueRef Size)
Creates and inserts a memcpy between the specified pointers.
LLVMBuildMemMove (LLVMBuilderRef B, LLVMValueRef Dst, unsigned DstAlign, LLVMValueRef Src, unsigned SrcAlign, LLVMValueRef Size)
Creates and inserts a memmove between the specified pointers.
LLVMBuildAlloca (LLVMBuilderRef B, LLVMTypeRef Ty, const char *Name)
LLVMBuildArrayAlloca (LLVMBuilderRef B, LLVMTypeRef Ty, LLVMValueRef Val, const char *Name)
LLVMBuildFree (LLVMBuilderRef B, LLVMValueRef PointerVal)
LLVMBuildLoad2 (LLVMBuilderRef B, LLVMTypeRef Ty, LLVMValueRef PointerVal, const char *Name)
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)
LLVMBuildFence (LLVMBuilderRef B, LLVMAtomicOrdering Ordering, LLVMBool isSingleThread, const char *Name)
LLVMBuildFenceSyncScope (LLVMBuilderRef B, LLVMAtomicOrdering Ordering, unsigned SSID, const char *Name)
LLVMBuildGEP2 (LLVMBuilderRef B, LLVMTypeRef Ty, LLVMValueRef Pointer, LLVMValueRef *Indices, unsigned NumIndices, const char *Name)
LLVMBuildInBoundsGEP2 (LLVMBuilderRef B, LLVMTypeRef Ty, LLVMValueRef Pointer, LLVMValueRef *Indices, unsigned NumIndices, const char *Name)
LLVMBuildGEPWithNoWrapFlags (LLVMBuilderRef B, LLVMTypeRef Ty, LLVMValueRef Pointer, LLVMValueRef *Indices, unsigned NumIndices, const char *Name, LLVMGEPNoWrapFlags NoWrapFlags)
Creates a GetElementPtr instruction.
LLVMBuildStructGEP2 (LLVMBuilderRef B, LLVMTypeRef Ty, LLVMValueRef Pointer, unsigned Idx, const char *Name)
LLVMBuildGlobalString (LLVMBuilderRef B, const char *Str, const char *Name)
LLVMBuildGlobalStringPtr (LLVMBuilderRef B, const char *Str, const char *Name)
Deprecated: Use LLVMBuildGlobalString instead, which has identical behavior.
LLVMGetVolatile (LLVMValueRef Inst)
void
LLVMSetVolatile (LLVMValueRef MemAccessInst, LLVMBool isVolatile)
LLVMGetWeak (LLVMValueRef CmpXchgInst)
void
LLVMSetWeak (LLVMValueRef CmpXchgInst, LLVMBool isWeak)
LLVMGetOrdering (LLVMValueRef MemAccessInst)
void
LLVMSetOrdering (LLVMValueRef MemAccessInst, LLVMAtomicOrdering Ordering)
LLVMGetAtomicRMWBinOp (LLVMValueRef Inst)
void
LLVMSetAtomicRMWBinOp (LLVMValueRef Inst, LLVMAtomicRMWBinOp BinOp)
LLVMBuildTrunc (LLVMBuilderRef B, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
LLVMBuildZExt (LLVMBuilderRef B, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
LLVMBuildSExt (LLVMBuilderRef B, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
LLVMBuildFPToUI (LLVMBuilderRef B, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
LLVMBuildFPToSI (LLVMBuilderRef B, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
LLVMBuildUIToFP (LLVMBuilderRef B, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
LLVMBuildSIToFP (LLVMBuilderRef B, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
LLVMBuildFPTrunc (LLVMBuilderRef B, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
LLVMBuildFPExt (LLVMBuilderRef B, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
LLVMBuildPtrToInt (LLVMBuilderRef B, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
LLVMBuildIntToPtr (LLVMBuilderRef B, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
LLVMBuildBitCast (LLVMBuilderRef B, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
LLVMBuildAddrSpaceCast (LLVMBuilderRef B, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
LLVMBuildZExtOrBitCast (LLVMBuilderRef B, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
LLVMBuildSExtOrBitCast (LLVMBuilderRef B, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
LLVMBuildTruncOrBitCast (LLVMBuilderRef B, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
LLVMBuildCast (LLVMBuilderRef B, LLVMOpcode Op, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
LLVMBuildPointerCast (LLVMBuilderRef B, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
LLVMBuildIntCast2 (LLVMBuilderRef B, LLVMValueRef Val, LLVMTypeRef DestTy, LLVMBool IsSigned, const char *Name)
LLVMBuildIntCast (LLVMBuilderRef B, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
Deprecated: This cast is always signed.
LLVMBuildFPCast (LLVMBuilderRef B, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
LLVMGetCastOpcode (LLVMValueRef Src, LLVMBool SrcIsSigned, LLVMTypeRef DestTy, LLVMBool DestIsSigned)
LLVMBuildICmp (LLVMBuilderRef B, LLVMIntPredicate Op, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
LLVMBuildFCmp (LLVMBuilderRef B, LLVMRealPredicate Op, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
LLVMBuildPhi (LLVMBuilderRef B, LLVMTypeRef Ty, const char *Name)
LLVMBuildCall2 (LLVMBuilderRef B, LLVMTypeRef Ty, LLVMValueRef Fn, LLVMValueRef *Args, unsigned NumArgs, const char *Name)
LLVMBuildCallWithOperandBundles (LLVMBuilderRef B, LLVMTypeRef Ty, LLVMValueRef Fn, LLVMValueRef *Args, unsigned NumArgs, LLVMOperandBundleRef *Bundles, unsigned NumBundles, const char *Name)
LLVMBuildSelect (LLVMBuilderRef B, LLVMValueRef If, LLVMValueRef Then, LLVMValueRef Else, const char *Name)
LLVMBuildVAArg (LLVMBuilderRef B, LLVMValueRef List, LLVMTypeRef Ty, const char *Name)
LLVMBuildExtractElement (LLVMBuilderRef B, LLVMValueRef VecVal, LLVMValueRef Index, const char *Name)
LLVMBuildInsertElement (LLVMBuilderRef B, LLVMValueRef VecVal, LLVMValueRef EltVal, LLVMValueRef Index, const char *Name)
LLVMBuildShuffleVector (LLVMBuilderRef B, LLVMValueRef V1, LLVMValueRef V2, LLVMValueRef Mask, const char *Name)
LLVMBuildExtractValue (LLVMBuilderRef B, LLVMValueRef AggVal, unsigned Index, const char *Name)
LLVMBuildInsertValue (LLVMBuilderRef B, LLVMValueRef AggVal, LLVMValueRef EltVal, unsigned Index, const char *Name)
LLVMBuildFreeze (LLVMBuilderRef B, LLVMValueRef Val, const char *Name)
LLVMBuildIsNull (LLVMBuilderRef B, LLVMValueRef Val, const char *Name)
LLVMBuildIsNotNull (LLVMBuilderRef B, LLVMValueRef Val, const char *Name)
LLVMBuildPtrDiff2 (LLVMBuilderRef B, LLVMTypeRef ElemTy, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
LLVMBuildAtomicRMW (LLVMBuilderRef B, LLVMAtomicRMWBinOp op, LLVMValueRef PTR, LLVMValueRef Val, LLVMAtomicOrdering ordering, LLVMBool singleThread)
LLVMBuildAtomicRMWSyncScope (LLVMBuilderRef B, LLVMAtomicRMWBinOp op, LLVMValueRef PTR, LLVMValueRef Val, LLVMAtomicOrdering ordering, unsigned SSID)
LLVMBuildAtomicCmpXchg (LLVMBuilderRef B, LLVMValueRef Ptr, LLVMValueRef Cmp, LLVMValueRef New, LLVMAtomicOrdering SuccessOrdering, LLVMAtomicOrdering FailureOrdering, LLVMBool singleThread)
LLVMBuildAtomicCmpXchgSyncScope (LLVMBuilderRef B, LLVMValueRef Ptr, LLVMValueRef Cmp, LLVMValueRef New, LLVMAtomicOrdering SuccessOrdering, LLVMAtomicOrdering FailureOrdering, unsigned SSID)
LLVMGetNumMaskElements (LLVMValueRef SVInst)
Get the number of elements in the mask of a ShuffleVector instruction.
int
LLVMGetMaskValue (LLVMValueRef SVInst, unsigned Elt)
Get the mask value at position Elt in the mask of a ShuffleVector instruction.
int
LLVMGetUndefMaskElem (void)
LLVMIsAtomic (LLVMValueRef Inst)
Returns whether an instruction is an atomic instruction, e.g., atomicrmw, cmpxchg, fence, or loads and stores with atomic ordering.
LLVMIsAtomicSingleThread (LLVMValueRef AtomicInst)
void
LLVMSetAtomicSingleThread (LLVMValueRef AtomicInst, LLVMBool NewValue)
LLVMGetAtomicSyncScopeID (LLVMValueRef AtomicInst)
Returns the synchronization scope ID of an atomic instruction.
void
LLVMSetAtomicSyncScopeID (LLVMValueRef AtomicInst, unsigned SSID)
Sets the synchronization scope ID of an atomic instruction.
LLVMGetCmpXchgSuccessOrdering (LLVMValueRef CmpXchgInst)
void
LLVMSetCmpXchgSuccessOrdering (LLVMValueRef CmpXchgInst, LLVMAtomicOrdering Ordering)
LLVMGetCmpXchgFailureOrdering (LLVMValueRef CmpXchgInst)
void
LLVMSetCmpXchgFailureOrdering (LLVMValueRef CmpXchgInst, LLVMAtomicOrdering Ordering)
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.
LLVMCreateMemoryBufferWithContentsOfFile (const char *Path, LLVMMemoryBufferRef *OutMemBuf, char **OutMessage)
LLVMCreateMemoryBufferWithSTDIN (LLVMMemoryBufferRef *OutMemBuf, char **OutMessage)
LLVMCreateMemoryBufferWithMemoryRange (const char *InputData, size_t InputDataLength, const char *BufferName, LLVMBool RequiresNullTerminator)
LLVMCreateMemoryBufferWithMemoryRangeCopy (const char *InputData, size_t InputDataLength, const char *BufferName)
LLVMGetBufferStart (LLVMMemoryBufferRef MemBuf)
size_t
LLVMGetBufferSize (LLVMMemoryBufferRef MemBuf)
void
LLVMDisposeMemoryBuffer (LLVMMemoryBufferRef MemBuf)
Constructs a new whole-module pass pipeline.
LLVMCreateFunctionPassManagerForModule (LLVMModuleRef M)
Constructs a new function-by-function pass pipeline over the module provider.
LLVMCreateFunctionPassManager (LLVMModuleProviderRef P)
Deprecated: Use LLVMCreateFunctionPassManagerForModule instead.
LLVMRunPassManager (LLVMPassManagerRef PM, LLVMModuleRef M)
Initializes, executes on the provided module, and finalizes all of the passes scheduled in the pass manager.
LLVMInitializeFunctionPassManager (LLVMPassManagerRef FPM)
Initializes all of the function passes scheduled in the function pass manager.
LLVMRunFunctionPassManager (LLVMPassManagerRef FPM, LLVMValueRef F)
Executes all of the function passes scheduled in the function pass manager on the provided function.
LLVMFinalizeFunctionPassManager (LLVMPassManagerRef FPM)
Finalizes all of the function passes scheduled in the function pass manager.
void
LLVMDisposePassManager (LLVMPassManagerRef PM)
Frees the memory of a pass pipeline.
Deprecated: Multi-threading can only be enabled/disabled with the compile time define LLVM_ENABLE_THREADS.
void
Deprecated: Multi-threading can only be enabled/disabled with the compile time define LLVM_ENABLE_THREADS.
Check whether LLVM is executing in thread-safe mode or not.