llvm

package module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 28, 2026 License: Apache-2.0 Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

llvm-c

GoDoc GitHub release LLGo XGo

LLGo bindings for LLVM's official C API (llvm-c), providing a stable, ABI-safe interface to LLVM's IR builder, module, and JIT infrastructure.

Documentation

Index

Constants

View Source
const (
	AttributeReturnIndex   = 0
	AttributeFunctionIndex = -1
)

Attribute index are either LLVMAttributeReturnIndex, LLVMAttributeFunctionIndex or a parameter number from 1 to N.

View Source
const (
	FastMathAllowReassoc    = 1
	FastMathNoNaNs          = 2
	FastMathNoInfs          = 4
	FastMathNoSignedZeros   = 8
	FastMathAllowReciprocal = 16
	FastMathAllowContract   = 32
	FastMathApproxFunc      = 64
	FastMathNone            = 0
	FastMathAll             = 127
)
View Source
const (
	GEPFlagInBounds = 1
	GEPFlagNUSW     = 2
	GEPFlagNUW      = 4
)
View Source
const (
	MDStringMetadataKind                     = 0
	ConstantAsMetadataMetadataKind           = 1
	LocalAsMetadataMetadataKind              = 2
	DistinctMDOperandPlaceholderMetadataKind = 3
	MDTupleMetadataKind                      = 4
	DILocationMetadataKind                   = 5
	DIExpressionMetadataKind                 = 6
	DIGlobalVariableExpressionMetadataKind   = 7
	GenericDINodeMetadataKind                = 8
	DISubrangeMetadataKind                   = 9
	DIEnumeratorMetadataKind                 = 10
	DIBasicTypeMetadataKind                  = 11
	DIDerivedTypeMetadataKind                = 12
	DICompositeTypeMetadataKind              = 13
	DISubroutineTypeMetadataKind             = 14
	DIFileMetadataKind                       = 15
	DICompileUnitMetadataKind                = 16
	DISubprogramMetadataKind                 = 17
	DILexicalBlockMetadataKind               = 18
	DILexicalBlockFileMetadataKind           = 19
	DINamespaceMetadataKind                  = 20
	DIModuleMetadataKind                     = 21
	DITemplateTypeParameterMetadataKind      = 22
	DITemplateValueParameterMetadataKind     = 23
	DIGlobalVariableMetadataKind             = 24
	DILocalVariableMetadataKind              = 25
	DILabelMetadataKind                      = 26
	DIObjCPropertyMetadataKind               = 27
	DIImportedEntityMetadataKind             = 28
	DIMacroMetadataKind                      = 29
	DIMacroFileMetadataKind                  = 30
	DICommonBlockMetadataKind                = 31
	DIStringTypeMetadataKind                 = 32
	DIGenericSubrangeMetadataKind            = 33
	DIArgListMetadataKind                    = 34
	DIAssignIDMetadataKind                   = 35
	DISubrangeTypeMetadataKind               = 36
	DIFixedPointTypeMetadataKind             = 37
)

The kind of metadata nodes.

View Source
const BLAKE3_BLOCK_LEN = 64
View Source
const BLAKE3_CHUNK_LEN = 1024
View Source
const BLAKE3_KEY_LEN = 32
View Source
const BLAKE3_MAX_DEPTH = 54
View Source
const BLAKE3_OUT_LEN = 32
View Source
const BLAKE3_VERSION_STRING = "1.8.2"
View Source
const DEFAULT_TARGET_TRIPLE = "arm64-apple-darwin24.6.0"
View Source
const Disassembler_Option_AsmPrinterVariant = 4
View Source
const Disassembler_Option_Color = 32
View Source
const Disassembler_Option_PrintImmHex = 2
View Source
const Disassembler_Option_PrintLatency = 16
View Source
const Disassembler_Option_SetInstrComments = 8
View Source
const Disassembler_Option_UseMarkup = 1
View Source
const Disassembler_ReferenceType_DeMangled_Name = 9
View Source
const Disassembler_ReferenceType_InOut_None = 0
View Source
const Disassembler_ReferenceType_In_ARM64_ADDXri = 4294967298
View Source
const Disassembler_ReferenceType_In_ARM64_ADR = 4294967301
View Source
const Disassembler_ReferenceType_In_ARM64_ADRP = 4294967297
View Source
const Disassembler_ReferenceType_In_ARM64_LDRXl = 4294967300
View Source
const Disassembler_ReferenceType_In_ARM64_LDRXui = 4294967299
View Source
const Disassembler_ReferenceType_In_Branch = 1
View Source
const Disassembler_ReferenceType_In_PCrel_Load = 2
View Source
const Disassembler_ReferenceType_Out_LitPool_CstrAddr = 3
View Source
const Disassembler_ReferenceType_Out_LitPool_SymAddr = 2
View Source
const Disassembler_ReferenceType_Out_Objc_CFString_Ref = 4
View Source
const Disassembler_ReferenceType_Out_Objc_Class_Ref = 8
View Source
const Disassembler_ReferenceType_Out_Objc_Message = 5
View Source
const Disassembler_ReferenceType_Out_Objc_Message_Ref = 6
View Source
const Disassembler_ReferenceType_Out_Objc_Selector_Ref = 7
View Source
const Disassembler_ReferenceType_Out_SymbolStub = 1
View Source
const Disassembler_VariantKind_ARM64_GOTPAGE = 3
View Source
const Disassembler_VariantKind_ARM64_GOTPAGEOFF = 4
View Source
const Disassembler_VariantKind_ARM64_PAGE = 1
View Source
const Disassembler_VariantKind_ARM64_PAGEOFF = 2
View Source
const Disassembler_VariantKind_ARM64_TLVOFF = 6
View Source
const Disassembler_VariantKind_ARM64_TLVP = 5
View Source
const Disassembler_VariantKind_ARM_HI16 = 1
View Source
const Disassembler_VariantKind_ARM_LO16 = 2
View Source
const Disassembler_VariantKind_None = 0
View Source
const ENABLE_DEBUGLOC_TRACKING_COVERAGE = 0
View Source
const ENABLE_DEBUGLOC_TRACKING_ORIGIN = 0
View Source
const ENABLE_DIA_SDK = 0
View Source
const ENABLE_IO_SANDBOX = 0
View Source
const ENABLE_ONDISK_CAS = 1
View Source
const ENABLE_TELEMETRY = 1
View Source
const ENABLE_THREADS = 1
View Source
const ENABLE_ZLIB = 1
View Source
const ENABLE_ZSTD = 1
View Source
const ErrorSuccess = 0
View Source
const FORCE_ENABLE_STATS = 0
View Source
const HAS_ATOMICS = 1
View Source
const HAVE_SYSEXITS_H = 1
View Source
const HOST_TRIPLE = "arm64-apple-darwin24.6.0"
View Source
const LLGoPackage = "link: -L$(llvm-config --libdir) -lLLVM; -lLLVM"
View Source
const LTO_API_VERSION = 30
View Source
const ON_UNIX = 1
View Source
const REMARKS_API_VERSION = 1
View Source
const UNREACHABLE_OPTIMIZE = 1
View Source
const USE_INTEL_JITEVENTS = 0
View Source
const USE_OPROFILE = 0
View Source
const USE_PERF = 0
View Source
const VERSION_MAJOR = 22
View Source
const VERSION_MINOR = 1
View Source
const VERSION_PATCH = 8
View Source
const VERSION_STRING = "22.1.8"

Variables

This section is empty.

Functions

func AddClause

func AddClause(LandingPad ValueRef, ClauseVal ValueRef)

func AddSymbol

func AddSymbol(symbolName *c.Char, symbolValue unsafe.Pointer)

This functions permanently adds the symbol \p symbolName with the value \p symbolValue. These symbols are searched before any libraries.

@see sys::DynamicLibrary::AddSymbol()

func AliasSetAliasee

func AliasSetAliasee(Alias ValueRef, Aliasee ValueRef)

Set the target value of an alias.

func ContextSetDiagnosticHandler

func ContextSetDiagnosticHandler(C ContextRef, Handler DiagnosticHandler, DiagnosticContext unsafe.Pointer)

Set the diagnostic handler for this context.

func ContextSetYieldCallback

func ContextSetYieldCallback(C ContextRef, Callback YieldCallback, OpaqueHandle unsafe.Pointer)

Set the yield callback function for this context.

@see LLVMContext::setYieldCallback()

func CreateMessage

func CreateMessage(Message *c.Char) *c.Char

func DISubprogramReplaceType

func DISubprogramReplaceType(Subprogram MetadataRef, SubroutineType MetadataRef)

Replace the subprogram subroutine type. \param Subprogram The subprogram object. \param SubroutineType The new subroutine type.

@see DISubprogram::replaceType()

func DebugMetadataVersion

func DebugMetadataVersion() c.Uint

The current debug metadata version number.

func DisposeErrorMessage

func DisposeErrorMessage(ErrMsg *c.Char)

Dispose of the given error message.

func DisposeMessage

func DisposeMessage(Message *c.Char)

func EnablePrettyStackTrace

func EnablePrettyStackTrace()

Enable LLVM's built-in stack trace code. This intercepts the OS's crash signals and prints which component of LLVM you were in at the time if the crash.

func GetDefaultTargetTriple

func GetDefaultTargetTriple() *c.Char

Get a triple for the host machine as a string. The result needs to be disposed with LLVMDisposeMessage.

func GetEnumAttributeKindForName

func GetEnumAttributeKindForName(Name *c.Char, SLen c.SizeT) c.Uint

Return an unique id given the name of a enum attribute, or 0 if no attribute by that name exists.

See http://llvm.org/docs/LangRef.html#parameter-attributes and http://llvm.org/docs/LangRef.html#function-attributes for the list of available attributes.

NB: Attribute names and/or id are subject to change without going through the C API deprecation cycle.

func GetHostCPUFeatures

func GetHostCPUFeatures() *c.Char

Get the host CPU's features as a string. The result needs to be disposed with LLVMDisposeMessage.

func GetHostCPUName

func GetHostCPUName() *c.Char

Get the host CPU as a string. The result needs to be disposed with LLVMDisposeMessage.

func GetLastEnumAttributeKind

func GetLastEnumAttributeKind() c.Uint

func GetMDKindID

func GetMDKindID(Name *c.Char, SLen c.Uint) c.Uint

func GetUndefMaskElem

func GetUndefMaskElem() c.Int

\returns a constant that specifies that the result of a \c ShuffleVectorInst is undefined.

func GetVersion

func GetVersion(Major *c.Uint, Minor *c.Uint, Patch *c.Uint)

Return the major, minor, and patch version of LLVM

The version components are returned via the function's three output parameters or skipped if a NULL pointer was supplied.

func InitializeAArch64AsmParser

func InitializeAArch64AsmParser()

func InitializeAArch64AsmPrinter

func InitializeAArch64AsmPrinter()

func InitializeAArch64Disassembler

func InitializeAArch64Disassembler()

func InitializeAArch64Target

func InitializeAArch64Target()

func InitializeAArch64TargetInfo

func InitializeAArch64TargetInfo()

func InitializeAArch64TargetMC

func InitializeAArch64TargetMC()

func InitializeAMDGPUAsmParser

func InitializeAMDGPUAsmParser()

func InitializeAMDGPUAsmPrinter

func InitializeAMDGPUAsmPrinter()

func InitializeAMDGPUDisassembler

func InitializeAMDGPUDisassembler()

func InitializeAMDGPUTarget

func InitializeAMDGPUTarget()

func InitializeAMDGPUTargetInfo

func InitializeAMDGPUTargetInfo()

func InitializeAMDGPUTargetMC

func InitializeAMDGPUTargetMC()

func InitializeARMAsmParser

func InitializeARMAsmParser()

func InitializeARMAsmPrinter

func InitializeARMAsmPrinter()

func InitializeARMDisassembler

func InitializeARMDisassembler()

func InitializeARMTarget

func InitializeARMTarget()

func InitializeARMTargetInfo

func InitializeARMTargetInfo()

func InitializeARMTargetMC

func InitializeARMTargetMC()

func InitializeAVRAsmParser

func InitializeAVRAsmParser()

func InitializeAVRAsmPrinter

func InitializeAVRAsmPrinter()

func InitializeAVRDisassembler

func InitializeAVRDisassembler()

func InitializeAVRTarget

func InitializeAVRTarget()

func InitializeAVRTargetInfo

func InitializeAVRTargetInfo()

func InitializeAVRTargetMC

func InitializeAVRTargetMC()

func InitializeBPFAsmParser

func InitializeBPFAsmParser()

func InitializeBPFAsmPrinter

func InitializeBPFAsmPrinter()

func InitializeBPFDisassembler

func InitializeBPFDisassembler()

func InitializeBPFTarget

func InitializeBPFTarget()

func InitializeBPFTargetInfo

func InitializeBPFTargetInfo()

func InitializeBPFTargetMC

func InitializeBPFTargetMC()

func InitializeHexagonAsmParser

func InitializeHexagonAsmParser()

func InitializeHexagonAsmPrinter

func InitializeHexagonAsmPrinter()

func InitializeHexagonDisassembler

func InitializeHexagonDisassembler()

func InitializeHexagonTarget

func InitializeHexagonTarget()

func InitializeHexagonTargetInfo

func InitializeHexagonTargetInfo()

func InitializeHexagonTargetMC

func InitializeHexagonTargetMC()

func InitializeLanaiAsmParser

func InitializeLanaiAsmParser()

func InitializeLanaiAsmPrinter

func InitializeLanaiAsmPrinter()

func InitializeLanaiDisassembler

func InitializeLanaiDisassembler()

func InitializeLanaiTarget

func InitializeLanaiTarget()

func InitializeLanaiTargetInfo

func InitializeLanaiTargetInfo()

func InitializeLanaiTargetMC

func InitializeLanaiTargetMC()

func InitializeLoongArchAsmParser

func InitializeLoongArchAsmParser()

func InitializeLoongArchAsmPrinter

func InitializeLoongArchAsmPrinter()

func InitializeLoongArchDisassembler

func InitializeLoongArchDisassembler()

func InitializeLoongArchTarget

func InitializeLoongArchTarget()

func InitializeLoongArchTargetInfo

func InitializeLoongArchTargetInfo()

func InitializeLoongArchTargetMC

func InitializeLoongArchTargetMC()

func InitializeMSP430AsmParser

func InitializeMSP430AsmParser()

func InitializeMSP430AsmPrinter

func InitializeMSP430AsmPrinter()

func InitializeMSP430Disassembler

func InitializeMSP430Disassembler()

func InitializeMSP430Target

func InitializeMSP430Target()

func InitializeMSP430TargetInfo

func InitializeMSP430TargetInfo()

func InitializeMSP430TargetMC

func InitializeMSP430TargetMC()

func InitializeMipsAsmParser

func InitializeMipsAsmParser()

func InitializeMipsAsmPrinter

func InitializeMipsAsmPrinter()

func InitializeMipsDisassembler

func InitializeMipsDisassembler()

func InitializeMipsTarget

func InitializeMipsTarget()

func InitializeMipsTargetInfo

func InitializeMipsTargetInfo()

func InitializeMipsTargetMC

func InitializeMipsTargetMC()

func InitializeNVPTXAsmPrinter

func InitializeNVPTXAsmPrinter()

func InitializeNVPTXTarget

func InitializeNVPTXTarget()

func InitializeNVPTXTargetInfo

func InitializeNVPTXTargetInfo()

func InitializeNVPTXTargetMC

func InitializeNVPTXTargetMC()

func InitializePowerPCAsmParser

func InitializePowerPCAsmParser()

func InitializePowerPCAsmPrinter

func InitializePowerPCAsmPrinter()

func InitializePowerPCDisassembler

func InitializePowerPCDisassembler()

func InitializePowerPCTarget

func InitializePowerPCTarget()

func InitializePowerPCTargetInfo

func InitializePowerPCTargetInfo()

func InitializePowerPCTargetMC

func InitializePowerPCTargetMC()

func InitializeRISCVAsmParser

func InitializeRISCVAsmParser()

func InitializeRISCVAsmPrinter

func InitializeRISCVAsmPrinter()

func InitializeRISCVDisassembler

func InitializeRISCVDisassembler()

func InitializeRISCVTarget

func InitializeRISCVTarget()

func InitializeRISCVTargetInfo

func InitializeRISCVTargetInfo()

func InitializeRISCVTargetMC

func InitializeRISCVTargetMC()

func InitializeSPIRVAsmPrinter

func InitializeSPIRVAsmPrinter()

func InitializeSPIRVTarget

func InitializeSPIRVTarget()

func InitializeSPIRVTargetInfo

func InitializeSPIRVTargetInfo()

func InitializeSPIRVTargetMC

func InitializeSPIRVTargetMC()

func InitializeSparcAsmParser

func InitializeSparcAsmParser()

func InitializeSparcAsmPrinter

func InitializeSparcAsmPrinter()

func InitializeSparcDisassembler

func InitializeSparcDisassembler()

func InitializeSparcTarget

func InitializeSparcTarget()

func InitializeSparcTargetInfo

func InitializeSparcTargetInfo()

func InitializeSparcTargetMC

func InitializeSparcTargetMC()

func InitializeSystemZAsmParser

func InitializeSystemZAsmParser()

func InitializeSystemZAsmPrinter

func InitializeSystemZAsmPrinter()

func InitializeSystemZDisassembler

func InitializeSystemZDisassembler()

func InitializeSystemZTarget

func InitializeSystemZTarget()

func InitializeSystemZTargetInfo

func InitializeSystemZTargetInfo()

func InitializeSystemZTargetMC

func InitializeSystemZTargetMC()

func InitializeVEAsmParser

func InitializeVEAsmParser()

func InitializeVEAsmPrinter

func InitializeVEAsmPrinter()

func InitializeVEDisassembler

func InitializeVEDisassembler()

func InitializeVETarget

func InitializeVETarget()

func InitializeVETargetInfo

func InitializeVETargetInfo()

func InitializeVETargetMC

func InitializeVETargetMC()

func InitializeWebAssemblyAsmParser

func InitializeWebAssemblyAsmParser()

func InitializeWebAssemblyAsmPrinter

func InitializeWebAssemblyAsmPrinter()

func InitializeWebAssemblyDisassembler

func InitializeWebAssemblyDisassembler()

func InitializeWebAssemblyTarget

func InitializeWebAssemblyTarget()

func InitializeWebAssemblyTargetInfo

func InitializeWebAssemblyTargetInfo()

func InitializeWebAssemblyTargetMC

func InitializeWebAssemblyTargetMC()

func InitializeX86AsmParser

func InitializeX86AsmParser()

func InitializeX86AsmPrinter

func InitializeX86AsmPrinter()

func InitializeX86Disassembler

func InitializeX86Disassembler()

func InitializeX86Target

func InitializeX86Target()

func InitializeX86TargetInfo

func InitializeX86TargetInfo()

func InitializeX86TargetMC

func InitializeX86TargetMC()

func InitializeXCoreAsmPrinter

func InitializeXCoreAsmPrinter()

func InitializeXCoreDisassembler

func InitializeXCoreDisassembler()

func InitializeXCoreTarget

func InitializeXCoreTarget()

func InitializeXCoreTargetInfo

func InitializeXCoreTargetInfo()

func InitializeXCoreTargetMC

func InitializeXCoreTargetMC()

func InstallFatalErrorHandler

func InstallFatalErrorHandler(Handler FatalErrorHandler)

Install a fatal error handler. By default, if LLVM detects a fatal error, it will call exit(1). This may not be appropriate in many contexts. For example, doing exit(1) will bypass many crash reporting/tracing system tools. This function allows you to install a callback that will be invoked prior to the call to exit(1).

func IntrinsicCopyOverloadedName deprecated

func IntrinsicCopyOverloadedName(ID c.Uint, ParamTypes *TypeRef, ParamCount c.SizeT, NameLength *c.SizeT) *c.Char

Deprecated: Use LLVMIntrinsicCopyOverloadedName2 instead.

func IntrinsicGetName

func IntrinsicGetName(ID c.Uint, NameLength *c.SizeT) *c.Char

Retrieves the name of an intrinsic.

@see llvm::Intrinsic::getName()

func LinkInInterpreter

func LinkInInterpreter()

Empty function used to force the linker to link the LLVM interpreter. Has no effect when called on a pre-built library (dylib interface).

func LinkInMCJIT

func LinkInMCJIT()

Empty function used to force the linker to link MCJIT. Has no effect when called on a pre-built library (dylib interface).

func LlvmBlake3Version

func LlvmBlake3Version() *c.Char

func LookupIntrinsicID

func LookupIntrinsicID(Name *c.Char, NameLen c.SizeT) c.Uint

Obtain the intrinsic ID number which matches the given function name.

@see llvm::Intrinsic::lookupIntrinsicID()

func LtoApiVersion

func LtoApiVersion() c.Uint

Returns the runtime API version.

\since LTO_API_VERSION=12

func LtoCodegenSetDiagnosticHandler

func LtoCodegenSetDiagnosticHandler(_llcppg_param1 LtoCodeGenT, _llcppg_param2 LtoDiagnosticHandlerT, _llcppg_param3 unsafe.Pointer)

Set a diagnostic handler and the related context (void *). This is more general than lto_get_error_message, as the diagnostic handler can be called at anytime within lto.

\since LTO_API_VERSION=7

func LtoGetErrorMessage

func LtoGetErrorMessage() *c.Char

Returns the last error string or NULL if last operation was successful.

\since prior to LTO_API_VERSION=3

func LtoGetVersion

func LtoGetVersion() *c.Char

Returns a printable string.

\since prior to LTO_API_VERSION=3

func LtoInitializeDisassembler

func LtoInitializeDisassembler()

Initializes LLVM disassemblers. FIXME: This doesn't really belong here.

\since LTO_API_VERSION=5

func LtoRuntimeLibSymbolsList

func LtoRuntimeLibSymbolsList(size *c.SizeT) **c.Char

Returns the list of libcall symbols that can be generated by LTO that might not be visible from the symbol table of bitcode files.

\since prior to LTO_API_VERSION=25

func LtoSetDebugOptions

func LtoSetDebugOptions(options **c.Char, number c.Int)

Parses options immediately, making them available as early as possible. For example during executing codegen::InitTargetOptionsFromCodeGenFlags. Since parsing shud only happen once, only one of lto_codegen_debug_options or lto_set_debug_options should be called.

This function takes one or more options separated by spaces. Warning: passing file paths through this function may confuse the argument parser if the paths contain spaces.

\since LTO_API_VERSION=28

func MetadataReplaceAllUsesWith

func MetadataReplaceAllUsesWith(TempTargetMetadata MetadataRef, Replacement MetadataRef)

Replace all uses of temporary metadata. \param TempTargetMetadata The temporary metadata node. \param Replacement The replacement metadata node.

func MoveBasicBlockAfter

func MoveBasicBlockAfter(BB BasicBlockRef, MovePos BasicBlockRef)

Move a basic block to after another one.

@see llvm::BasicBlock::moveAfter()

func MoveBasicBlockBefore

func MoveBasicBlockBefore(BB BasicBlockRef, MovePos BasicBlockRef)

Move a basic block to before another one.

@see llvm::BasicBlock::moveBefore()

func NormalizeTargetTriple

func NormalizeTargetTriple(triple *c.Char) *c.Char

Normalize a target triple. The result needs to be disposed with LLVMDisposeMessage.

func OrcExecutionSessionLookup

func OrcExecutionSessionLookup(ES OrcExecutionSessionRef, K OrcLookupKind, SearchOrder OrcCJITDylibSearchOrder, SearchOrderSize c.SizeT, Symbols OrcCLookupSet, SymbolsSize c.SizeT, HandleResult OrcExecutionSessionLookupHandleResultFunction, Ctx unsafe.Pointer)

Look up symbols in an execution session.

This is a wrapper around the general ExecutionSession::lookup function.

The SearchOrder argument contains a list of (JITDylibs, JITDylibSearchFlags) pairs that describe the search order. The JITDylibs will be searched in the given order to try to find the symbols in the Symbols argument.

The Symbols argument should contain a null-terminated array of (SymbolStringPtr, SymbolLookupFlags) pairs describing the symbols to be searched for. This function takes ownership of the elements of the Symbols array. The Name fields of the Symbols elements are taken to have been retained by the client for this function. The client should *not* release the Name fields, but are still responsible for destroying the array itself.

The HandleResult function will be called once all searched for symbols have been found, or an error occurs. The HandleResult function will be passed an LLVMErrorRef indicating success or failure, and (on success) a null-terminated LLVMOrcCSymbolMapPairs array containing the function result, and the Ctx value passed to the lookup function.

The client is fully responsible for managing the lifetime of the Ctx object. A common idiom is to allocate the context prior to the lookup and deallocate it in the handler.

THIS API IS EXPERIMENTAL AND LIKELY TO CHANGE IN THE NEAR FUTURE!

func OrcExecutionSessionSetErrorReporter

func OrcExecutionSessionSetErrorReporter(ES OrcExecutionSessionRef, ReportError OrcErrorReporterFunction, Ctx unsafe.Pointer)

Attach a custom error reporter function to the ExecutionSession.

The error reporter will be called to deliver failure notices that can not be directly reported to a caller. For example, failure to resolve symbols in the JIT linker is typically reported via the error reporter (callers requesting definitions from the JIT will typically be delivered a FailureToMaterialize error instead).

func OrcIRTransformLayerSetTransform

func OrcIRTransformLayerSetTransform(IRTransformLayer OrcIRTransformLayerRef, TransformFunction OrcIRTransformLayerTransformFunction, Ctx unsafe.Pointer)

Set the transform function of the provided transform layer, passing through a pointer to user provided context.

func OrcLLJITBuilderSetObjectLinkingLayerCreator

func OrcLLJITBuilderSetObjectLinkingLayerCreator(Builder OrcLLJITBuilderRef, F OrcLLJITBuilderObjectLinkingLayerCreatorFunction, Ctx unsafe.Pointer)

Set an ObjectLinkingLayer creator function for this LLJIT instance.

func OrcObjectTransformLayerSetTransform

func OrcObjectTransformLayerSetTransform(ObjTransformLayer OrcObjectTransformLayerRef, TransformFunction OrcObjectTransformLayerTransformFunction, Ctx unsafe.Pointer)

Set the transform function on an LLVMOrcObjectTransformLayer.

func OrcResourceTrackerTransferTo

func OrcResourceTrackerTransferTo(SrcRT OrcResourceTrackerRef, DstRT OrcResourceTrackerRef)

Transfers tracking of all resources associated with resource tracker SrcRT to resource tracker DstRT.

func ParseCommandLineOptions

func ParseCommandLineOptions(argc c.Int, argv **c.Char, Overview *c.Char)

This function parses the given arguments using the LLVM command line parser. Note that the only stable thing about this function is its signature; you cannot rely on any particular set of command line arguments being interpreted the same way across LLVM versions.

@see llvm::cl::ParseCommandLineOptions()

func RemarkVersion

func RemarkVersion() c.Uint32T

Returns the version of the remarks library.

\since REMARKS_API_VERSION=0

func ReplaceAllUsesWith

func ReplaceAllUsesWith(OldVal ValueRef, NewVal ValueRef)

Replace all uses of a value with another one.

@see llvm::Value::replaceAllUsesWith()

func ResetFatalErrorHandler

func ResetFatalErrorHandler()

Reset the fatal error handler. This resets LLVM's fatal error handling behavior to the default.

func SearchForAddressOfSymbol

func SearchForAddressOfSymbol(symbolName *c.Char) unsafe.Pointer

This function will search through all previously loaded dynamic libraries for the symbol \p symbolName. If it is found, the address of that symbol is returned. If not, null is returned.

@see sys::DynamicLibrary::SearchForAddressOfSymbol()

func SetCondition

func SetCondition(Branch ValueRef, Cond ValueRef)

Set the condition of a branch instruction.

This only works on llvm::BranchInst instructions.

@see llvm::BranchInst::setCondition

func SetGlobalIFuncResolver

func SetGlobalIFuncResolver(IFunc ValueRef, Resolver ValueRef)

Sets the resolver function associated with this indirect function.

@see llvm::GlobalIFunc::setResolver()

func SetInitializer

func SetInitializer(GlobalVar ValueRef, ConstantVal ValueRef)

func SetParentCatchSwitch

func SetParentCatchSwitch(CatchPad ValueRef, CatchSwitch ValueRef)

Set the parent catchswitch instruction of a catchpad instruction.

This only works on llvm::CatchPadInst instructions.

@see llvm::CatchPadInst::setCatchSwitch()

func SetPersonalityFn

func SetPersonalityFn(Fn ValueRef, PersonalityFn ValueRef)

Set the personality function attached to the function.

@see llvm::Function::setPersonalityFn()

func SetPrefixData

func SetPrefixData(Fn ValueRef, prefixData ValueRef)

Sets the prefix data for the function. Only valid on functions. See https://llvm.org/docs/LangRef.html#prefix-data

func SetPrologueData

func SetPrologueData(Fn ValueRef, prologueData ValueRef)

Sets the prologue data for the function. Only valid on functions. See https://llvm.org/docs/LangRef.html#prologue-data

func Shutdown

func Shutdown()

Deallocate and destroy all ManagedStatic variables. @see llvm::llvm_shutdown @see ManagedStatic

func StopMultithreaded deprecated

func StopMultithreaded()

Deprecated: Multi-threading can only be enabled/disabled with the compile time define LLVM_ENABLE_THREADS.

func ThinltoDebugOptions

func ThinltoDebugOptions(options **c.Char, number c.Int)

Parse -mllvm style debug options.

\since LTO_API_VERSION=18

Types

type AtomicOrdering

type AtomicOrdering c.Int
const (
	// < A load or store which is not atomic
	AtomicOrderingNotAtomic AtomicOrdering = 0
	// < Lowest level of atomicity, guarantees
	// somewhat sane results, lock free.
	AtomicOrderingUnordered AtomicOrdering = 1
	// < guarantees that if you take all the
	// operations affecting a specific address,
	// a consistent ordering exists
	AtomicOrderingMonotonic AtomicOrdering = 2
	// < Acquire provides a barrier of the sort
	// necessary to acquire a lock to access other
	// memory with normal loads and stores.
	AtomicOrderingAcquire AtomicOrdering = 4
	// < Release is similar to Acquire, but with
	// a barrier of the sort necessary to release
	// a lock.
	AtomicOrderingRelease AtomicOrdering = 5
	// < provides both an Acquire and a
	// Release barrier (for fences and
	// operations which both read and write
	// memory).
	AtomicOrderingAcquireRelease AtomicOrdering = 6
	// < provides Acquire semantics
	// for loads and Release
	// semantics for stores.
	// Additionally, it guarantees
	// that a total ordering exists
	// between all
	// SequentiallyConsistent
	// operations.
	AtomicOrderingSequentiallyConsistent AtomicOrdering = 7
)

type AtomicRMWBinOp

type AtomicRMWBinOp c.Int
const (
	// < Set the new value and return the one old
	AtomicRMWBinOpXchg AtomicRMWBinOp = 0
	// < Add a value and return the old one
	AtomicRMWBinOpAdd AtomicRMWBinOp = 1
	// < Subtract a value and return the old one
	AtomicRMWBinOpSub AtomicRMWBinOp = 2
	// < And a value and return the old one
	AtomicRMWBinOpAnd AtomicRMWBinOp = 3
	// < Not-And a value and return the old one
	AtomicRMWBinOpNand AtomicRMWBinOp = 4
	// < OR a value and return the old one
	AtomicRMWBinOpOr AtomicRMWBinOp = 5
	// < Xor a value and return the old one
	AtomicRMWBinOpXor AtomicRMWBinOp = 6
	// < Sets the value if it's greater than the
	// original using a signed comparison and return
	// the old one
	AtomicRMWBinOpMax AtomicRMWBinOp = 7
	// < Sets the value if it's Smaller than the
	// original using a signed comparison and return
	// the old one
	AtomicRMWBinOpMin AtomicRMWBinOp = 8
	// < Sets the value if it's greater than the
	// original using an unsigned comparison and return
	// the old one
	AtomicRMWBinOpUMax AtomicRMWBinOp = 9
	// < Sets the value if it's greater than the
	// original using an unsigned comparison and return
	// the old one
	AtomicRMWBinOpUMin AtomicRMWBinOp = 10
	// < Add a floating point value and return the
	// old one
	AtomicRMWBinOpFAdd AtomicRMWBinOp = 11
	// < Subtract a floating point value and return the
	// old one
	AtomicRMWBinOpFSub AtomicRMWBinOp = 12
	// < Sets the value if it's greater than the
	// original using an floating point comparison and
	// return the old one
	AtomicRMWBinOpFMax AtomicRMWBinOp = 13
	// < Sets the value if it's smaller than the
	// original using an floating point comparison and
	// return the old one
	AtomicRMWBinOpFMin AtomicRMWBinOp = 14
	// < Increments the value, wrapping back to zero
	// when incremented above input value
	AtomicRMWBinOpUIncWrap AtomicRMWBinOp = 15
	// < Decrements the value, wrapping back to
	// the input value when decremented below zero
	AtomicRMWBinOpUDecWrap AtomicRMWBinOp = 16
	// <Subtracts the value only if no unsigned
	// overflow
	AtomicRMWBinOpUSubCond AtomicRMWBinOp = 17
	// <Subtracts the value, clamping to zero
	AtomicRMWBinOpUSubSat AtomicRMWBinOp = 18
	// < Sets the value if it's greater than the
	// original using an floating point comparison and
	// return the old one
	AtomicRMWBinOpFMaximum AtomicRMWBinOp = 19
	// < Sets the value if it's smaller than the
	// original using an floating point comparison and
	// return the old one
	AtomicRMWBinOpFMinimum AtomicRMWBinOp = 20
)

type AttributeIndex

type AttributeIndex = c.Uint

type AttributeRef

type AttributeRef = *OpaqueAttributeRef

Used to represent an attributes.

@see llvm::Attribute

type BasicBlockRef

type BasicBlockRef = *OpaqueBasicBlock

Represents a basic block of instructions in LLVM IR.

This models llvm::BasicBlock.

type BinaryRef

type BinaryRef = *OpaqueBinary

@see llvm::object::Binary

type BinaryType

type BinaryType c.Int
const (
	// < Archive file.
	BinaryTypeArchive BinaryType = 0
	// < Mach-O Universal Binary file.
	BinaryTypeMachOUniversalBinary BinaryType = 1
	// < COFF Import file.
	BinaryTypeCOFFImportFile BinaryType = 2
	// < LLVM IR.
	BinaryTypeIR BinaryType = 3
	// < Windows resource (.res) file.
	BinaryTypeWinRes BinaryType = 4
	// < COFF Object file.
	BinaryTypeCOFF BinaryType = 5
	// < ELF 32-bit, little endian.
	BinaryTypeELF32L BinaryType = 6
	// < ELF 32-bit, big endian.
	BinaryTypeELF32B BinaryType = 7
	// < ELF 64-bit, little endian.
	BinaryTypeELF64L BinaryType = 8
	// < ELF 64-bit, big endian.
	BinaryTypeELF64B BinaryType = 9
	// < MachO 32-bit, little endian.
	BinaryTypeMachO32L BinaryType = 10
	// < MachO 32-bit, big endian.
	BinaryTypeMachO32B BinaryType = 11
	// < MachO 64-bit, little endian.
	BinaryTypeMachO64L BinaryType = 12
	// < MachO 64-bit, big endian.
	BinaryTypeMachO64B BinaryType = 13
	// < Web Assembly.
	BinaryTypeWasm BinaryType = 14
	// < Offloading fatbinary.
	BinaryTypeOffload BinaryType = 15
	// < DirectX Binary Container.
	BinaryTypeDXcontainer BinaryType = 16
)

type Bool

type Bool = c.Int

@defgroup LLVMCSupportTypes Types and Enumerations

@{

func CreateMemoryBufferWithContentsOfFile

func CreateMemoryBufferWithContentsOfFile(Path *c.Char, OutMemBuf *MemoryBufferRef, OutMessage **c.Char) Bool

@defgroup LLVMCCoreMemoryBuffers Memory Buffers

@{

func GetTargetFromTriple

func GetTargetFromTriple(Triple *c.Char, T *TargetRef, ErrorMessage **c.Char) Bool

Finds the target corresponding to the given triple and stores it in \p T. Returns 0 on success. Optionally returns any error in ErrorMessage. Use LLVMDisposeMessage to dispose the message.

func IntrinsicIsOverloaded

func IntrinsicIsOverloaded(ID c.Uint) Bool

Obtain if the intrinsic identified by the given ID is overloaded.

@see llvm::Intrinsic::isOverloaded()

func IsMultithreaded

func IsMultithreaded() Bool

Check whether LLVM is executing in thread-safe mode or not. @see llvm::llvm_is_multithreaded

func LinkModules2

func LinkModules2(Dest ModuleRef, Src ModuleRef) Bool

func LoadLibraryPermanently

func LoadLibraryPermanently(Filename *c.Char) Bool

This function permanently loads the dynamic library at the given path. It is safe to call this function multiple times for the same library.

@see sys::DynamicLibrary::LoadLibraryPermanently()

func StartMultithreaded deprecated

func StartMultithreaded() Bool

Deprecated: Multi-threading can only be enabled/disabled with the compile time define LLVM_ENABLE_THREADS. This function always returns LLVMIsMultithreaded().

type BuilderRef

type BuilderRef = *OpaqueBuilder

Represents an LLVM basic block builder.

This models llvm::IRBuilder.

func CreateBuilder

func CreateBuilder() BuilderRef

type ByteOrdering

type ByteOrdering c.Int

@defgroup LLVMCTarget Target information @ingroup LLVMC

@{

const (
	BigEndian    ByteOrdering = 0
	LittleEndian ByteOrdering = 1
)

type CallConv

type CallConv c.Int
const (
	CCallConv             CallConv = 0
	FastCallConv          CallConv = 8
	ColdCallConv          CallConv = 9
	GHCCallConv           CallConv = 10
	HiPECallConv          CallConv = 11
	AnyRegCallConv        CallConv = 13
	PreserveMostCallConv  CallConv = 14
	PreserveAllCallConv   CallConv = 15
	SwiftCallConv         CallConv = 16
	CXXFASTTLSCallConv    CallConv = 17
	X86StdcallCallConv    CallConv = 64
	X86FastcallCallConv   CallConv = 65
	ARMAPCSCallConv       CallConv = 66
	ARMAAPCSCallConv      CallConv = 67
	ARMAAPCSVFPCallConv   CallConv = 68
	MSP430INTRCallConv    CallConv = 69
	X86ThisCallCallConv   CallConv = 70
	PTXKernelCallConv     CallConv = 71
	PTXDeviceCallConv     CallConv = 72
	SPIRFUNCCallConv      CallConv = 75
	SPIRKERNELCallConv    CallConv = 76
	IntelOCLBICallConv    CallConv = 77
	X8664SysVCallConv     CallConv = 78
	Win64CallConv         CallConv = 79
	X86VectorCallCallConv CallConv = 80
	HHVMCallConv          CallConv = 81
	HHVMCCallConv         CallConv = 82
	X86INTRCallConv       CallConv = 83
	AVRINTRCallConv       CallConv = 84
	AVRSIGNALCallConv     CallConv = 85
	AVRBUILTINCallConv    CallConv = 86
	AMDGPUVSCallConv      CallConv = 87
	AMDGPUGSCallConv      CallConv = 88
	AMDGPUPSCallConv      CallConv = 89
	AMDGPUCSCallConv      CallConv = 90
	AMDGPUKERNELCallConv  CallConv = 91
	X86RegCallCallConv    CallConv = 92
	AMDGPUHSCallConv      CallConv = 93
	MSP430BUILTINCallConv CallConv = 94
	AMDGPULSCallConv      CallConv = 95
	AMDGPUESCallConv      CallConv = 96
)

type ChecksumKind

type ChecksumKind c.Int

The kind of checksum to emit.

const (
	CSK_MD5    ChecksumKind = 0
	CSK_SHA1   ChecksumKind = 1
	CSK_SHA256 ChecksumKind = 2
)

type CodeGenFileType

type CodeGenFileType c.Int
const (
	AssemblyFile CodeGenFileType = 0
	ObjectFile   CodeGenFileType = 1
)

type CodeGenOptLevel

type CodeGenOptLevel c.Int
const (
	CodeGenLevelNone       CodeGenOptLevel = 0
	CodeGenLevelLess       CodeGenOptLevel = 1
	CodeGenLevelDefault    CodeGenOptLevel = 2
	CodeGenLevelAggressive CodeGenOptLevel = 3
)

type CodeModel

type CodeModel c.Int
const (
	CodeModelDefault    CodeModel = 0
	CodeModelJITDefault CodeModel = 1
	CodeModelTiny       CodeModel = 2
	CodeModelSmall      CodeModel = 3
	CodeModelKernel     CodeModel = 4
	CodeModelMedium     CodeModel = 5
	CodeModelLarge      CodeModel = 6
)

type Comdat

type Comdat struct {
}

func (*Comdat) ComdatSelectionKind

func (self *Comdat) ComdatSelectionKind() ComdatSelectionKind

llgo:link (*Comdat).ComdatSelectionKind C.LLVMGetComdatSelectionKind

func (*Comdat) SetComdatSelectionKind

func (self *Comdat) SetComdatSelectionKind(Kind ComdatSelectionKind)

llgo:link (*Comdat).SetComdatSelectionKind C.LLVMSetComdatSelectionKind

type ComdatRef

type ComdatRef = *Comdat

@see llvm::Comdat

type ComdatSelectionKind

type ComdatSelectionKind c.Int

@defgroup LLVMCCoreComdat Comdats @ingroup LLVMCCore

@{

const (
	// < The linker may choose any COMDAT.
	AnyComdatSelectionKind ComdatSelectionKind = 0
	// < The data referenced by the COMDAT must
	// < be the same.
	ExactMatchComdatSelectionKind ComdatSelectionKind = 1
	// < The linker will choose the largest
	// < COMDAT.
	LargestComdatSelectionKind ComdatSelectionKind = 2
	// < No deduplication is performed.
	NoDeduplicateComdatSelectionKind ComdatSelectionKind = 3
	// < The data referenced by the COMDAT must be
	// < the same size.
	SameSizeComdatSelectionKind ComdatSelectionKind = 4
)

type ContextRef

type ContextRef = *OpaqueContext

The top-level container for all LLVM global data. See the LLVMContext class.

func ContextCreate

func ContextCreate() ContextRef

Create a new context.

Every call to this function should be paired with a call to LLVMContextDispose() or the context will leak memory.

func GetGlobalContext

func GetGlobalContext() ContextRef

Obtain the global context instance.

type DIBuilderRef

type DIBuilderRef = *OpaqueDIBuilder

Represents an LLVM debug info builder.

This models llvm::DIBuilder.

type DIFlags

type DIFlags c.Int

Debug info flags.

const (
	DIFlagZero                DIFlags = 0
	DIFlagPrivate             DIFlags = 1
	DIFlagProtected           DIFlags = 2
	DIFlagPublic              DIFlags = 3
	DIFlagFwdDecl             DIFlags = 4
	DIFlagAppleBlock          DIFlags = 8
	DIFlagReservedBit4        DIFlags = 16
	DIFlagVirtual             DIFlags = 32
	DIFlagArtificial          DIFlags = 64
	DIFlagExplicit            DIFlags = 128
	DIFlagPrototyped          DIFlags = 256
	DIFlagObjcClassComplete   DIFlags = 512
	DIFlagObjectPointer       DIFlags = 1024
	DIFlagVector              DIFlags = 2048
	DIFlagStaticMember        DIFlags = 4096
	DIFlagLValueReference     DIFlags = 8192
	DIFlagRValueReference     DIFlags = 16384
	DIFlagReserved            DIFlags = 32768
	DIFlagSingleInheritance   DIFlags = 65536
	DIFlagMultipleInheritance DIFlags = 131072
	DIFlagVirtualInheritance  DIFlags = 196608
	DIFlagIntroducedVirtual   DIFlags = 262144
	DIFlagBitField            DIFlags = 524288
	DIFlagNoReturn            DIFlags = 1048576
	DIFlagTypePassByValue     DIFlags = 4194304
	DIFlagTypePassByReference DIFlags = 8388608
	DIFlagEnumClass           DIFlags = 16777216
	DIFlagFixedEnum           DIFlags = 16777216
	DIFlagThunk               DIFlags = 33554432
	DIFlagNonTrivial          DIFlags = 67108864
	DIFlagBigEndian           DIFlags = 134217728
	DIFlagLittleEndian        DIFlags = 268435456
	DIFlagIndirectVirtualBase DIFlags = 36
	DIFlagAccessibility       DIFlags = 3
	DIFlagPtrToMemberRep      DIFlags = 196608
)

type DLLStorageClass

type DLLStorageClass c.Int
const (
	DefaultStorageClass DLLStorageClass = 0
	// < Function to be imported from DLL.
	DLLImportStorageClass DLLStorageClass = 1
	// < Function to be accessible from DLL.
	DLLExportStorageClass DLLStorageClass = 2
)

type DWARFEmissionKind

type DWARFEmissionKind c.Int

The amount of debug information to emit.

const (
	DWARFEmissionNone           DWARFEmissionKind = 0
	DWARFEmissionFull           DWARFEmissionKind = 1
	DWARFEmissionLineTablesOnly DWARFEmissionKind = 2
)

type DWARFMacinfoRecordType

type DWARFMacinfoRecordType c.Int

Describes the kind of macro declaration used for LLVMDIBuilderCreateMacro. @see llvm::dwarf::MacinfoRecordType @note Values are from DW_MACINFO_* constants in the DWARF specification.

const (
	DWARFMacinfoRecordTypeDefine    DWARFMacinfoRecordType = 1
	DWARFMacinfoRecordTypeMacro     DWARFMacinfoRecordType = 2
	DWARFMacinfoRecordTypeStartFile DWARFMacinfoRecordType = 3
	DWARFMacinfoRecordTypeEndFile   DWARFMacinfoRecordType = 4
	DWARFMacinfoRecordTypeVendorExt DWARFMacinfoRecordType = 255
)

type DWARFSourceLanguage

type DWARFSourceLanguage c.Int

Source languages known by DWARF.

const (
	DWARFSourceLanguageC89                 DWARFSourceLanguage = 0
	DWARFSourceLanguageC                   DWARFSourceLanguage = 1
	DWARFSourceLanguageAda83               DWARFSourceLanguage = 2
	DWARFSourceLanguageCPlusPlus           DWARFSourceLanguage = 3
	DWARFSourceLanguageCobol74             DWARFSourceLanguage = 4
	DWARFSourceLanguageCobol85             DWARFSourceLanguage = 5
	DWARFSourceLanguageFortran77           DWARFSourceLanguage = 6
	DWARFSourceLanguageFortran90           DWARFSourceLanguage = 7
	DWARFSourceLanguagePascal83            DWARFSourceLanguage = 8
	DWARFSourceLanguageModula2             DWARFSourceLanguage = 9
	DWARFSourceLanguageJava                DWARFSourceLanguage = 10
	DWARFSourceLanguageC99                 DWARFSourceLanguage = 11
	DWARFSourceLanguageAda95               DWARFSourceLanguage = 12
	DWARFSourceLanguageFortran95           DWARFSourceLanguage = 13
	DWARFSourceLanguagePLI                 DWARFSourceLanguage = 14
	DWARFSourceLanguageObjC                DWARFSourceLanguage = 15
	DWARFSourceLanguageObjCPlusPlus        DWARFSourceLanguage = 16
	DWARFSourceLanguageUPC                 DWARFSourceLanguage = 17
	DWARFSourceLanguageD                   DWARFSourceLanguage = 18
	DWARFSourceLanguagePython              DWARFSourceLanguage = 19
	DWARFSourceLanguageOpenCL              DWARFSourceLanguage = 20
	DWARFSourceLanguageGo                  DWARFSourceLanguage = 21
	DWARFSourceLanguageModula3             DWARFSourceLanguage = 22
	DWARFSourceLanguageHaskell             DWARFSourceLanguage = 23
	DWARFSourceLanguageCPlusPlus03         DWARFSourceLanguage = 24
	DWARFSourceLanguageCPlusPlus11         DWARFSourceLanguage = 25
	DWARFSourceLanguageOCaml               DWARFSourceLanguage = 26
	DWARFSourceLanguageRust                DWARFSourceLanguage = 27
	DWARFSourceLanguageC11                 DWARFSourceLanguage = 28
	DWARFSourceLanguageSwift               DWARFSourceLanguage = 29
	DWARFSourceLanguageJulia               DWARFSourceLanguage = 30
	DWARFSourceLanguageDylan               DWARFSourceLanguage = 31
	DWARFSourceLanguageCPlusPlus14         DWARFSourceLanguage = 32
	DWARFSourceLanguageFortran03           DWARFSourceLanguage = 33
	DWARFSourceLanguageFortran08           DWARFSourceLanguage = 34
	DWARFSourceLanguageRenderScript        DWARFSourceLanguage = 35
	DWARFSourceLanguageBLISS               DWARFSourceLanguage = 36
	DWARFSourceLanguageKotlin              DWARFSourceLanguage = 37
	DWARFSourceLanguageZig                 DWARFSourceLanguage = 38
	DWARFSourceLanguageCrystal             DWARFSourceLanguage = 39
	DWARFSourceLanguageCPlusPlus17         DWARFSourceLanguage = 40
	DWARFSourceLanguageCPlusPlus20         DWARFSourceLanguage = 41
	DWARFSourceLanguageC17                 DWARFSourceLanguage = 42
	DWARFSourceLanguageFortran18           DWARFSourceLanguage = 43
	DWARFSourceLanguageAda2005             DWARFSourceLanguage = 44
	DWARFSourceLanguageAda2012             DWARFSourceLanguage = 45
	DWARFSourceLanguageHIP                 DWARFSourceLanguage = 46
	DWARFSourceLanguageAssembly            DWARFSourceLanguage = 47
	DWARFSourceLanguageCSharp              DWARFSourceLanguage = 48
	DWARFSourceLanguageMojo                DWARFSourceLanguage = 49
	DWARFSourceLanguageGLSL                DWARFSourceLanguage = 50
	DWARFSourceLanguageGLSL_ES             DWARFSourceLanguage = 51
	DWARFSourceLanguageHLSL                DWARFSourceLanguage = 52
	DWARFSourceLanguageOpenCL_CPP          DWARFSourceLanguage = 53
	DWARFSourceLanguageCPPForOpenCL        DWARFSourceLanguage = 54
	DWARFSourceLanguageSYCL                DWARFSourceLanguage = 55
	DWARFSourceLanguageRuby                DWARFSourceLanguage = 56
	DWARFSourceLanguageMove                DWARFSourceLanguage = 57
	DWARFSourceLanguageHylo                DWARFSourceLanguage = 58
	DWARFSourceLanguageMetal               DWARFSourceLanguage = 59
	DWARFSourceLanguageMips_Assembler      DWARFSourceLanguage = 60
	DWARFSourceLanguageGOOGLE_RenderScript DWARFSourceLanguage = 61
	DWARFSourceLanguageBORLAND_Delphi      DWARFSourceLanguage = 62
)

type DWARFTypeEncoding

type DWARFTypeEncoding = c.Uint

An LLVM DWARF type encoding.

type DbgRecordKind

type DbgRecordKind c.Int
const (
	DbgRecordLabel   DbgRecordKind = 0
	DbgRecordDeclare DbgRecordKind = 1
	DbgRecordValue   DbgRecordKind = 2
	DbgRecordAssign  DbgRecordKind = 3
)

type DbgRecordRef

type DbgRecordRef = *OpaqueDbgRecord

@see llvm::DbgRecord

type DiagnosticHandler

type DiagnosticHandler = func(_llcppg_param1 DiagnosticInfoRef, _llcppg_param2 unsafe.Pointer)

@defgroup LLVMCCoreContext Contexts

Contexts are execution states for the core LLVM IR system.

Most types are tied to a context instance. Multiple contexts can exist simultaneously. A single context is not thread safe. However, different contexts can execute on different threads simultaneously.

@{

llgo:type C

func ContextGetDiagnosticHandler

func ContextGetDiagnosticHandler(C ContextRef) DiagnosticHandler

Get the diagnostic handler of this context.

type DiagnosticInfoRef

type DiagnosticInfoRef = *OpaqueDiagnosticInfo

@see llvm::DiagnosticInfo

type DiagnosticSeverity

type DiagnosticSeverity c.Int
const (
	DSError   DiagnosticSeverity = 0
	DSWarning DiagnosticSeverity = 1
	DSRemark  DiagnosticSeverity = 2
	DSNote    DiagnosticSeverity = 3
)

type DisasmContextRef

type DisasmContextRef uintptr

An opaque reference to a disassembler context.

func CreateDisasm

func CreateDisasm(TripleName *c.Char, DisInfo unsafe.Pointer, TagType c.Int, GetOpInfo OpInfoCallback, SymbolLookUp SymbolLookupCallback) DisasmContextRef

Create a disassembler for the TripleName. Symbolic disassembly is supported by passing a block of information in the DisInfo parameter and specifying the TagType and callback functions as described above. These can all be passed as NULL. If successful, this returns a disassembler context. If not, it returns NULL. This function is equivalent to calling LLVMCreateDisasmCPUFeatures() with an empty CPU name and feature set.

func CreateDisasmCPU

func CreateDisasmCPU(Triple *c.Char, CPU *c.Char, DisInfo unsafe.Pointer, TagType c.Int, GetOpInfo OpInfoCallback, SymbolLookUp SymbolLookupCallback) DisasmContextRef

Create a disassembler for the TripleName and a specific CPU. Symbolic disassembly is supported by passing a block of information in the DisInfo parameter and specifying the TagType and callback functions as described above. These can all be passed * as NULL. If successful, this returns a disassembler context. If not, it returns NULL. This function is equivalent to calling LLVMCreateDisasmCPUFeatures() with an empty feature set.

func CreateDisasmCPUFeatures

func CreateDisasmCPUFeatures(Triple *c.Char, CPU *c.Char, Features *c.Char, DisInfo unsafe.Pointer, TagType c.Int, GetOpInfo OpInfoCallback, SymbolLookUp SymbolLookupCallback) DisasmContextRef

Create a disassembler for the TripleName, a specific CPU and specific feature string. Symbolic disassembly is supported by passing a block of information in the DisInfo parameter and specifying the TagType and callback functions as described above. These can all be passed * as NULL. If successful, this returns a disassembler context. If not, it returns NULL.

func (DisasmContextRef) Dispose added in v0.2.0

func (self DisasmContextRef) Dispose()

Dispose of a disassembler context.

llgo:link DisasmContextRef.Dispose C.LLVMDisasmDispose

func (DisasmContextRef) Instruction added in v0.2.0

func (self DisasmContextRef) Instruction(Bytes *c.Uint8T, BytesSize c.Uint64T, PC c.Uint64T, OutString *c.Char, OutStringSize c.SizeT) c.SizeT

Disassemble a single instruction using the disassembler context specified in the parameter DC. The bytes of the instruction are specified in the parameter Bytes, and contains at least BytesSize number of bytes. The instruction is at the address specified by the PC parameter. If a valid instruction can be disassembled, its string is returned indirectly in OutString whose size is specified in the parameter OutStringSize. This function returns the number of bytes in the instruction or zero if there was no valid instruction.

llgo:link DisasmContextRef.Instruction C.LLVMDisasmInstruction

func (DisasmContextRef) SetOptions added in v0.2.0

func (self DisasmContextRef) SetOptions(Options c.Uint64T) c.Int

Set the disassembler's options. Returns 1 if it can set the Options and 0 otherwise.

llgo:link DisasmContextRef.SetOptions C.LLVMSetDisasmOptions

type ErrorRef

type ErrorRef = *OpaqueError

Opaque reference to an error instance. Null serves as the 'success' value.

func CreateStringError

func CreateStringError(ErrMsg *c.Char) ErrorRef

Create a StringError.

func OrcCreateDynamicLibrarySearchGeneratorForPath

func OrcCreateDynamicLibrarySearchGeneratorForPath(Result *OrcDefinitionGeneratorRef, FileName *c.Char, GlobalPrefix c.Char, Filter OrcSymbolPredicate, FilterCtx unsafe.Pointer) ErrorRef

Get a LLVMOrcCreateDynamicLibararySearchGeneratorForPath that will reflect library symbols into the JITDylib. On success the resulting generator is owned by the client. Ownership is typically transferred by adding the instance to a JITDylib using LLVMOrcJITDylibAddGenerator,

The GlobalPrefix argument specifies the character that appears on the front of linker-mangled symbols for the target platform (e.g. '_' on MachO). If non-null, this character will be stripped from the start of all symbol strings before passing the remaining substring to dlsym.

The optional Filter and Ctx arguments can be used to supply a symbol name filter: Only symbols for which the filter returns true will be visible to JIT'd code. If the Filter argument is null then all library symbols will be visible to JIT'd code. Note that the symbol name passed to the Filter function is the full mangled symbol: The client is responsible for stripping the global prefix if present.

THIS API IS EXPERIMENTAL AND LIKELY TO CHANGE IN THE NEAR FUTURE!

func OrcCreateDynamicLibrarySearchGeneratorForProcess

func OrcCreateDynamicLibrarySearchGeneratorForProcess(Result *OrcDefinitionGeneratorRef, GlobalPrefx c.Char, Filter OrcSymbolPredicate, FilterCtx unsafe.Pointer) ErrorRef

Get a DynamicLibrarySearchGenerator that will reflect process symbols into the JITDylib. On success the resulting generator is owned by the client. Ownership is typically transferred by adding the instance to a JITDylib using LLVMOrcJITDylibAddGenerator,

The GlobalPrefix argument specifies the character that appears on the front of linker-mangled symbols for the target platform (e.g. '_' on MachO). If non-null, this character will be stripped from the start of all symbol strings before passing the remaining substring to dlsym.

The optional Filter and Ctx arguments can be used to supply a symbol name filter: Only symbols for which the filter returns true will be visible to JIT'd code. If the Filter argument is null then all process symbols will be visible to JIT'd code. Note that the symbol name passed to the Filter function is the full mangled symbol: The client is responsible for stripping the global prefix if present.

func OrcCreateLocalLazyCallThroughManager

func OrcCreateLocalLazyCallThroughManager(TargetTriple *c.Char, ES OrcExecutionSessionRef, ErrorHandlerAddr OrcJITTargetAddress, LCTM *OrcLazyCallThroughManagerRef) ErrorRef

func OrcThreadSafeModuleWithModuleDo

func OrcThreadSafeModuleWithModuleDo(TSM OrcThreadSafeModuleRef, F OrcGenericIRModuleOperationFunction, Ctx unsafe.Pointer) ErrorRef

Apply the given function to the module contained in this ThreadSafeModule.

type ErrorTypeId

type ErrorTypeId uintptr

Error type identifier.

func GetStringErrorTypeId

func GetStringErrorTypeId() ErrorTypeId

Returns the type id for llvm StringError.

type ExecutionEngineRef

type ExecutionEngineRef = *OpaqueExecutionEngine

type FastMathFlags

type FastMathFlags = c.Uint

Flags to indicate what fast-math-style optimizations are allowed on operations.

See https://llvm.org/docs/LangRef.html#fast-math-flags

type FatalErrorHandler

type FatalErrorHandler = func(_llcppg_param1 *c.Char)

@addtogroup LLVMCError

@{

llgo:type C

type GEPNoWrapFlags

type GEPNoWrapFlags = c.Uint

Flags that constrain the allowed wrap semantics of a getelementptr instruction.

See https://llvm.org/docs/LangRef.html#getelementptr-instruction

type GenericValueRef

type GenericValueRef = *OpaqueGenericValue

func CreateGenericValueOfPointer

func CreateGenericValueOfPointer(P unsafe.Pointer) GenericValueRef

type GlobalISelAbortMode

type GlobalISelAbortMode c.Int
const (
	GlobalISelAbortEnable          GlobalISelAbortMode = 0
	GlobalISelAbortDisable         GlobalISelAbortMode = 1
	GlobalISelAbortDisableWithDiag GlobalISelAbortMode = 2
)

type InlineAsmDialect

type InlineAsmDialect c.Int
const (
	InlineAsmDialectATT   InlineAsmDialect = 0
	InlineAsmDialectIntel InlineAsmDialect = 1
)

type IntPredicate

type IntPredicate c.Int
const (
	// < equal
	IntEQ IntPredicate = 32
	// < not equal
	IntNE IntPredicate = 33
	// < unsigned greater than
	IntUGT IntPredicate = 34
	// < unsigned greater or equal
	IntUGE IntPredicate = 35
	// < unsigned less than
	IntULT IntPredicate = 36
	// < unsigned less or equal
	IntULE IntPredicate = 37
	// < signed greater than
	IntSGT IntPredicate = 38
	// < signed greater or equal
	IntSGE IntPredicate = 39
	// < signed less than
	IntSLT IntPredicate = 40
	// < signed less or equal
	IntSLE IntPredicate = 41
)

type JITEvaluatedSymbol

type JITEvaluatedSymbol struct {
	Address OrcExecutorAddress
	Flags   JITSymbolFlags
}

Represents an evaluated symbol address and flags.

type JITEventListenerRef

type JITEventListenerRef = *OpaqueJITEventListener

@see llvm::JITEventListener

func CreateGDBRegistrationListener

func CreateGDBRegistrationListener() JITEventListenerRef

func CreateIntelJITEventListener

func CreateIntelJITEventListener() JITEventListenerRef

func CreateOProfileJITEventListener

func CreateOProfileJITEventListener() JITEventListenerRef

func CreatePerfJITEventListener

func CreatePerfJITEventListener() JITEventListenerRef

type JITSymbolFlags

type JITSymbolFlags struct {
	GenericFlags c.Uint8T
	TargetFlags  c.Uint8T
}

Represents the linkage flags for a symbol definition.

type JITSymbolGenericFlags

type JITSymbolGenericFlags c.Int

Represents generic linkage flags for a symbol definition.

const (
	JITSymbolGenericFlagsNone                           JITSymbolGenericFlags = 0
	JITSymbolGenericFlagsExported                       JITSymbolGenericFlags = 1
	JITSymbolGenericFlagsWeak                           JITSymbolGenericFlags = 2
	JITSymbolGenericFlagsCallable                       JITSymbolGenericFlags = 4
	JITSymbolGenericFlagsMaterializationSideEffectsOnly JITSymbolGenericFlags = 8
)

type JITSymbolTargetFlags

type JITSymbolTargetFlags = c.Uint8T

Represents target specific flags for a symbol definition.

type LTOObjectBuffer

type LTOObjectBuffer struct {
	Buffer *c.Char
	Size   c.SizeT
}

Type to wrap a single object returned by ThinLTO.

\since LTO_API_VERSION=18

type Linkage

type Linkage c.Int
const (
	// < Externally visible function
	ExternalLinkage            Linkage = 0
	AvailableExternallyLinkage Linkage = 1
	// < Keep one copy of function when linking (inline)
	LinkOnceAnyLinkage Linkage = 2
	// < Same, but only replaced by something
	// equivalent.
	LinkOnceODRLinkage Linkage = 3
	// < Obsolete
	LinkOnceODRAutoHideLinkage Linkage = 4
	// < Keep one copy of function when linking (weak)
	WeakAnyLinkage Linkage = 5
	// < Same, but only replaced by something
	// equivalent.
	WeakODRLinkage Linkage = 6
	// < Special purpose, only applies to global arrays
	AppendingLinkage Linkage = 7
	// < Rename collisions when linking (static
	// functions)
	InternalLinkage Linkage = 8
	// < Like Internal, but omit from symbol table
	PrivateLinkage Linkage = 9
	// < Obsolete
	DLLImportLinkage Linkage = 10
	// < Obsolete
	DLLExportLinkage Linkage = 11
	// < ExternalWeak linkage description
	ExternalWeakLinkage Linkage = 12
	// < Obsolete
	GhostLinkage Linkage = 13
	// < Tentative definitions
	CommonLinkage Linkage = 14
	// < Like Private, but linker removes.
	LinkerPrivateLinkage Linkage = 15
	// < Like LinkerPrivate, but is weak.
	LinkerPrivateWeakLinkage Linkage = 16
)

type LinkerMode

type LinkerMode c.Int

@defgroup LLVMCCoreLinker Linker @ingroup LLVMCCore

@{

const (
	LinkerDestroySource          LinkerMode = 0
	LinkerPreserveSource_Removed LinkerMode = 1
)

type LlvmBlake3ChunkState

type LlvmBlake3ChunkState struct {
	Cv               [8]c.Uint32T
	ChunkCounter     c.Uint64T
	Buf              [64]c.Uint8T
	BufLen           c.Uint8T
	BlocksCompressed c.Uint8T
	Flags            c.Uint8T
}

type LlvmBlake3Hasher

type LlvmBlake3Hasher struct {
	Key        [8]c.Uint32T
	Chunk      LlvmBlake3ChunkState
	CvStackLen c.Uint8T
	CvStack    [1760]c.Uint8T
}

func (*LlvmBlake3Hasher) Finalize

func (self *LlvmBlake3Hasher) Finalize(out *c.Uint8T, out_len c.SizeT)

llgo:link (*LlvmBlake3Hasher).Finalize C.llvm_blake3_hasher_finalize

func (*LlvmBlake3Hasher) FinalizeSeek

func (self *LlvmBlake3Hasher) FinalizeSeek(seek c.Uint64T, out *c.Uint8T, out_len c.SizeT)

llgo:link (*LlvmBlake3Hasher).FinalizeSeek C.llvm_blake3_hasher_finalize_seek

func (*LlvmBlake3Hasher) Init

func (self *LlvmBlake3Hasher) Init()

llgo:link (*LlvmBlake3Hasher).Init C.llvm_blake3_hasher_init

func (*LlvmBlake3Hasher) InitDeriveKey

func (self *LlvmBlake3Hasher) InitDeriveKey(context *c.Char)

llgo:link (*LlvmBlake3Hasher).InitDeriveKey C.llvm_blake3_hasher_init_derive_key

func (*LlvmBlake3Hasher) InitDeriveKeyRaw

func (self *LlvmBlake3Hasher) InitDeriveKeyRaw(context unsafe.Pointer, context_len c.SizeT)

llgo:link (*LlvmBlake3Hasher).InitDeriveKeyRaw C.llvm_blake3_hasher_init_derive_key_raw

func (*LlvmBlake3Hasher) InitKeyed

func (self *LlvmBlake3Hasher) InitKeyed(key *c.Uint8T)

llgo:link (*LlvmBlake3Hasher).InitKeyed C.llvm_blake3_hasher_init_keyed

func (*LlvmBlake3Hasher) Reset

func (self *LlvmBlake3Hasher) Reset()

llgo:link (*LlvmBlake3Hasher).Reset C.llvm_blake3_hasher_reset

func (*LlvmBlake3Hasher) Update

func (self *LlvmBlake3Hasher) Update(input unsafe.Pointer, input_len c.SizeT)

llgo:link (*LlvmBlake3Hasher).Update C.llvm_blake3_hasher_update

type LtoBoolT

type LtoBoolT = bool

func LtoModuleHasObjcCategory

func LtoModuleHasObjcCategory(mem unsafe.Pointer, length c.SizeT) LtoBoolT

Return true if \p Buffer contains a bitcode file with ObjC code (category or class) in it.

\since LTO_API_VERSION=20

func LtoModuleIsObjectFile

func LtoModuleIsObjectFile(path *c.Char) LtoBoolT

Checks if a file is a loadable object file.

\since prior to LTO_API_VERSION=3

func LtoModuleIsObjectFileForTarget

func LtoModuleIsObjectFileForTarget(path *c.Char, target_triple_prefix *c.Char) LtoBoolT

Checks if a file is a loadable object compiled for requested target.

\since prior to LTO_API_VERSION=3

func LtoModuleIsObjectFileInMemory

func LtoModuleIsObjectFileInMemory(mem unsafe.Pointer, length c.SizeT) LtoBoolT

Checks if a buffer is a loadable object file.

\since prior to LTO_API_VERSION=3

func LtoModuleIsObjectFileInMemoryForTarget

func LtoModuleIsObjectFileInMemoryForTarget(mem unsafe.Pointer, length c.SizeT, target_triple_prefix *c.Char) LtoBoolT

Checks if a buffer is a loadable object compiled for requested target.

\since prior to LTO_API_VERSION=3

type LtoCodeGenT

type LtoCodeGenT = *OpaqueLTOCodeGenerator

opaque reference to a code generator

func LtoCodegenCreate

func LtoCodegenCreate() LtoCodeGenT

Instantiates a code generator. Returns NULL on error (check lto_get_error_message() for details).

All modules added using \a lto_codegen_add_module() must have been created in the same context as the codegen.

\since prior to LTO_API_VERSION=3

func LtoCodegenCreateInLocalContext

func LtoCodegenCreateInLocalContext() LtoCodeGenT

Instantiate a code generator in its own context.

Instantiates a code generator in its own context. Modules added via \a lto_codegen_add_module() must have all been created in the same context, using \a lto_module_create_in_codegen_context().

\since LTO_API_VERSION=11

type LtoCodegenDiagnosticSeverityT

type LtoCodegenDiagnosticSeverityT c.Int

Diagnostic severity.

\since LTO_API_VERSION=7

const (
	LTO_DS_ERROR   LtoCodegenDiagnosticSeverityT = 0
	LTO_DS_WARNING LtoCodegenDiagnosticSeverityT = 1
	LTO_DS_REMARK  LtoCodegenDiagnosticSeverityT = 3
	LTO_DS_NOTE    LtoCodegenDiagnosticSeverityT = 2
)

type LtoCodegenModel

type LtoCodegenModel c.Int

\since prior to LTO_API_VERSION=3

const (
	LTO_CODEGEN_PIC_MODEL_STATIC         LtoCodegenModel = 0
	LTO_CODEGEN_PIC_MODEL_DYNAMIC        LtoCodegenModel = 1
	LTO_CODEGEN_PIC_MODEL_DYNAMIC_NO_PIC LtoCodegenModel = 2
	LTO_CODEGEN_PIC_MODEL_DEFAULT        LtoCodegenModel = 3
)

type LtoDebugModel

type LtoDebugModel c.Int

\since prior to LTO_API_VERSION=3

const (
	LTO_DEBUG_MODEL_NONE  LtoDebugModel = 0
	LTO_DEBUG_MODEL_DWARF LtoDebugModel = 1
)

type LtoDiagnosticHandlerT

type LtoDiagnosticHandlerT = func(_llcppg_param1 LtoCodegenDiagnosticSeverityT, _llcppg_param2 *c.Char, _llcppg_param3 unsafe.Pointer)

Diagnostic handler type. \p severity defines the severity. \p diag is the actual diagnostic. The diagnostic is not prefixed by any of severity keyword, e.g., 'error: '. \p ctxt is used to pass the context set with the diagnostic handler.

\since LTO_API_VERSION=7

llgo:type C

type LtoInputT

type LtoInputT = *OpaqueLTOInput

Opaque reference to an LTO input file

func LtoInputCreate

func LtoInputCreate(buffer unsafe.Pointer, buffer_size c.SizeT, path *c.Char) LtoInputT

Creates an LTO input file from a buffer. The path argument is used for diagnotics as this function otherwise does not know which file the given buffer is associated with.

\since LTO_API_VERSION=24

type LtoModuleT

type LtoModuleT = *OpaqueLTOModule

opaque reference to a loaded object module

func LtoModuleCreate

func LtoModuleCreate(path *c.Char) LtoModuleT

Loads an object file from disk. Returns NULL on error (check lto_get_error_message() for details).

\since prior to LTO_API_VERSION=3

func LtoModuleCreateFromFd

func LtoModuleCreateFromFd(fd c.Int, path *c.Char, file_size c.SizeT) LtoModuleT

Loads an object file from disk. The seek point of fd is not preserved. Returns NULL on error (check lto_get_error_message() for details).

\since LTO_API_VERSION=5

func LtoModuleCreateFromFdAtOffset

func LtoModuleCreateFromFdAtOffset(fd c.Int, path *c.Char, file_size c.SizeT, map_size c.SizeT, offset os.OffT) LtoModuleT

Loads an object file from disk. The seek point of fd is not preserved. Returns NULL on error (check lto_get_error_message() for details).

\since LTO_API_VERSION=5

func LtoModuleCreateFromMemory

func LtoModuleCreateFromMemory(mem unsafe.Pointer, length c.SizeT) LtoModuleT

Loads an object file from memory. Returns NULL on error (check lto_get_error_message() for details).

\since prior to LTO_API_VERSION=3

func LtoModuleCreateFromMemoryWithPath

func LtoModuleCreateFromMemoryWithPath(mem unsafe.Pointer, length c.SizeT, path *c.Char) LtoModuleT

Loads an object file from memory with an extra path argument. Returns NULL on error (check lto_get_error_message() for details).

\since LTO_API_VERSION=9

func LtoModuleCreateInCodegenContext

func LtoModuleCreateInCodegenContext(mem unsafe.Pointer, length c.SizeT, path *c.Char, cg LtoCodeGenT) LtoModuleT

Loads an object file in the codegen context.

Loads an object file into the same context as \c cg. The module is safe to add using \a lto_codegen_add_module().

Returns NULL on error (check lto_get_error_message() for details).

\since LTO_API_VERSION=11

func LtoModuleCreateInLocalContext

func LtoModuleCreateInLocalContext(mem unsafe.Pointer, length c.SizeT, path *c.Char) LtoModuleT

Loads an object file in its own context.

Loads an object file in its own LLVMContext. This function call is thread-safe. However, modules created this way should not be merged into an lto_code_gen_t using \a lto_codegen_add_module().

Returns NULL on error (check lto_get_error_message() for details).

\since LTO_API_VERSION=11

type LtoSymbolAttributes

type LtoSymbolAttributes c.Int

\since prior to LTO_API_VERSION=3

const (
	LTO_SYMBOL_ALIGNMENT_MASK              LtoSymbolAttributes = 31
	LTO_SYMBOL_PERMISSIONS_MASK            LtoSymbolAttributes = 224
	LTO_SYMBOL_PERMISSIONS_CODE            LtoSymbolAttributes = 160
	LTO_SYMBOL_PERMISSIONS_DATA            LtoSymbolAttributes = 192
	LTO_SYMBOL_PERMISSIONS_RODATA          LtoSymbolAttributes = 128
	LTO_SYMBOL_DEFINITION_MASK             LtoSymbolAttributes = 1792
	LTO_SYMBOL_DEFINITION_REGULAR          LtoSymbolAttributes = 256
	LTO_SYMBOL_DEFINITION_TENTATIVE        LtoSymbolAttributes = 512
	LTO_SYMBOL_DEFINITION_WEAK             LtoSymbolAttributes = 768
	LTO_SYMBOL_DEFINITION_UNDEFINED        LtoSymbolAttributes = 1024
	LTO_SYMBOL_DEFINITION_WEAKUNDEF        LtoSymbolAttributes = 1280
	LTO_SYMBOL_SCOPE_MASK                  LtoSymbolAttributes = 14336
	LTO_SYMBOL_SCOPE_INTERNAL              LtoSymbolAttributes = 2048
	LTO_SYMBOL_SCOPE_HIDDEN                LtoSymbolAttributes = 4096
	LTO_SYMBOL_SCOPE_PROTECTED             LtoSymbolAttributes = 8192
	LTO_SYMBOL_SCOPE_DEFAULT               LtoSymbolAttributes = 6144
	LTO_SYMBOL_SCOPE_DEFAULT_CAN_BE_HIDDEN LtoSymbolAttributes = 10240
	LTO_SYMBOL_COMDAT                      LtoSymbolAttributes = 16384
	LTO_SYMBOL_ALIAS                       LtoSymbolAttributes = 32768
)

type MCJITCompilerOptions

type MCJITCompilerOptions struct {
	OptLevel           c.Uint
	CodeModel          CodeModel
	NoFramePointerElim Bool
	EnableFastISel     Bool
	MCJMM              MCJITMemoryManagerRef
}

func (*MCJITCompilerOptions) Initialize

func (self *MCJITCompilerOptions) Initialize(SizeOfOptions c.SizeT)

llgo:link (*MCJITCompilerOptions).Initialize C.LLVMInitializeMCJITCompilerOptions

type MCJITMemoryManagerRef

type MCJITMemoryManagerRef = *OpaqueMCJITMemoryManager

func CreateSimpleMCJITMemoryManager

func CreateSimpleMCJITMemoryManager(Opaque unsafe.Pointer, AllocateCodeSection MemoryManagerAllocateCodeSectionCallback, AllocateDataSection MemoryManagerAllocateDataSectionCallback, FinalizeMemory MemoryManagerFinalizeMemoryCallback, Destroy MemoryManagerDestroyCallback) MCJITMemoryManagerRef

Create a simple custom MCJIT memory manager. This memory manager can intercept allocations in a module-oblivious way. This will return NULL if any of the passed functions are NULL.

@param Opaque An opaque client object to pass back to the callbacks. @param AllocateCodeSection Allocate a block of memory for executable code. @param AllocateDataSection Allocate a block of memory for data. @param FinalizeMemory Set page permissions and flush cache. Return 0 on

success, 1 on error.

type MemoryBufferRef

type MemoryBufferRef = *OpaqueMemoryBuffer

Used to pass regions of memory through LLVM interfaces.

@see llvm::MemoryBuffer

func CreateMemoryBufferWithMemoryRange

func CreateMemoryBufferWithMemoryRange(InputData *c.Char, InputDataLength c.SizeT, BufferName *c.Char, RequiresNullTerminator Bool) MemoryBufferRef

func CreateMemoryBufferWithMemoryRangeCopy

func CreateMemoryBufferWithMemoryRangeCopy(InputData *c.Char, InputDataLength c.SizeT, BufferName *c.Char) MemoryBufferRef

type MemoryManagerAllocateCodeSectionCallback

type MemoryManagerAllocateCodeSectionCallback = func(_llcppg_param1 unsafe.Pointer, _llcppg_param2 c.UintptrT, _llcppg_param3 c.Uint, _llcppg_param4 c.Uint, _llcppg_param5 *c.Char) *c.Uint8T

llgo:type C

type MemoryManagerAllocateDataSectionCallback

type MemoryManagerAllocateDataSectionCallback = func(_llcppg_param1 unsafe.Pointer, _llcppg_param2 c.UintptrT, _llcppg_param3 c.Uint, _llcppg_param4 c.Uint, _llcppg_param5 *c.Char, _llcppg_param6 Bool) *c.Uint8T

llgo:type C

type MemoryManagerCreateContextCallback

type MemoryManagerCreateContextCallback = func(_llcppg_param1 unsafe.Pointer) unsafe.Pointer

llgo:type C

type MemoryManagerDestroyCallback

type MemoryManagerDestroyCallback = func(_llcppg_param1 unsafe.Pointer)

llgo:type C

type MemoryManagerFinalizeMemoryCallback

type MemoryManagerFinalizeMemoryCallback = func(_llcppg_param1 unsafe.Pointer, _llcppg_param2 **c.Char) Bool

llgo:type C

type MemoryManagerNotifyTerminatingCallback

type MemoryManagerNotifyTerminatingCallback = func(_llcppg_param1 unsafe.Pointer)

llgo:type C

type MetadataKind

type MetadataKind = c.Uint

type MetadataRef

type MetadataRef = *OpaqueMetadata

Represents an LLVM Metadata.

This models llvm::Metadata.

type ModuleFlagBehavior

type ModuleFlagBehavior c.Int
const (
	// Emits an error if two values disagree, otherwise the resulting value is
	// that of the operands.
	//
	// @see Module::ModFlagBehavior::Error
	ModuleFlagBehaviorError ModuleFlagBehavior = 0
	// Emits a warning if two values disagree. The result value will be the
	// operand for the flag from the first module being linked.
	//
	// @see Module::ModFlagBehavior::Warning
	ModuleFlagBehaviorWarning ModuleFlagBehavior = 1
	// Adds a requirement that another module flag be present and have a
	// specified value after linking is performed. The value must be a metadata
	// pair, where the first element of the pair is the ID of the module flag
	// to be restricted, and the second element of the pair is the value the
	// module flag should be restricted to. This behavior can be used to
	// restrict the allowable results (via triggering of an error) of linking
	// IDs with the **Override** behavior.
	//
	// @see Module::ModFlagBehavior::Require
	ModuleFlagBehaviorRequire ModuleFlagBehavior = 2
	// Uses the specified value, regardless of the behavior or value of the
	// other module. If both modules specify **Override**, but the values
	// differ, an error will be emitted.
	//
	// @see Module::ModFlagBehavior::Override
	ModuleFlagBehaviorOverride ModuleFlagBehavior = 3
	// Appends the two values, which are required to be metadata nodes.
	//
	// @see Module::ModFlagBehavior::Append
	ModuleFlagBehaviorAppend ModuleFlagBehavior = 4
	// Appends the two values, which are required to be metadata
	// nodes. However, duplicate entries in the second list are dropped
	// during the append operation.
	//
	// @see Module::ModFlagBehavior::AppendUnique
	ModuleFlagBehaviorAppendUnique ModuleFlagBehavior = 5
)

type ModuleFlagEntry

type ModuleFlagEntry = OpaqueModuleFlagEntry

@see llvm::Module::ModuleFlagEntry

type ModuleProviderRef

type ModuleProviderRef = *OpaqueModuleProvider

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

type ModuleRef

type ModuleRef = *OpaqueModule

The top-level container for all other LLVM Intermediate Representation (IR) objects.

@see llvm::Module

func ModuleCreateWithName

func ModuleCreateWithName(ModuleID *c.Char) ModuleRef

Create a new, empty module in the global context.

This is equivalent to calling LLVMModuleCreateWithNameInContext with LLVMGetGlobalContext() as the context parameter.

Every invocation should be paired with LLVMDisposeModule() or memory will be leaked.

func ModuleCreateWithNameInContext

func ModuleCreateWithNameInContext(ModuleID *c.Char, C ContextRef) ModuleRef

Create a new, empty module in a specific context.

Every invocation should be paired with LLVMDisposeModule() or memory will be leaked.

type NamedMDNodeRef

type NamedMDNodeRef = *OpaqueNamedMDNode

Represents an LLVM Named Metadata Node.

This models llvm::NamedMDNode.

type ObjectFileRef deprecated

type ObjectFileRef = *OpaqueObjectFile

Deprecated: Use LLVMBinaryRef instead.

type OpInfo1

type OpInfo1 struct {
	AddSymbol      OpInfoSymbol1
	SubtractSymbol OpInfoSymbol1
	Value          c.Uint64T
	VariantKind    c.Uint64T
}

type OpInfoCallback

type OpInfoCallback = func(_llcppg_param1 unsafe.Pointer, _llcppg_param2 c.Uint64T, _llcppg_param3 c.Uint64T, _llcppg_param4 c.Uint64T, _llcppg_param5 c.Uint64T, _llcppg_param6 c.Int, _llcppg_param7 unsafe.Pointer) c.Int

The type for the operand information call back function. This is called to get the symbolic information for an operand of an instruction. Typically this is from the relocation information, symbol table, etc. That block of information is saved when the disassembler context is created and passed to the call back in the DisInfo parameter. The instruction containing operand is at the PC parameter. For some instruction sets, there can be more than one operand with symbolic information. To determine the symbolic operand information for each operand, the bytes for the specific operand in the instruction are specified by the Offset parameter and its byte widith is the OpSize parameter. For instructions sets with fixed widths and one symbolic operand per instruction, the Offset parameter will be zero and InstSize parameter will be the instruction width. The information is returned in TagBuf and is Triple specific with its specific information defined by the value of TagType for that Triple. If symbolic information is returned the function * returns 1, otherwise it returns 0.

llgo:type C

type OpInfoSymbol1

type OpInfoSymbol1 struct {
	Present c.Uint64T
	Name    *c.Char
	Value   c.Uint64T
}

The initial support in LLVM MC for the most general form of a relocatable expression is "AddSymbol - SubtractSymbol + Offset". For some Darwin targets this full form is encoded in the relocation information so that AddSymbol and SubtractSymbol can be link edited independent of each other. Many other platforms only allow a relocatable expression of the form AddSymbol + Offset to be encoded.

The LLVMOpInfoCallback() for the TagType value of 1 uses the struct LLVMOpInfo1. The value of the relocatable expression for the operand, including any PC adjustment, is passed in to the call back in the Value field. The symbolic information about the operand is returned using all the fields of the structure with the Offset of the relocatable expression returned in the Value field. It is possible that some symbols in the relocatable expression were assembly temporary symbols, for example "Ldata - LpicBase + constant", and only the Values of the symbols without symbol names are present in the relocation information. The VariantKind type is one of the Target specific #defines below and is used to print operands like "_foo@GOT", ":lower16:_foo", etc.

type OpaqueAttributeRef

type OpaqueAttributeRef struct {
}

func (*OpaqueAttributeRef) EnumAttributeKind

func (self *OpaqueAttributeRef) EnumAttributeKind() c.Uint

Get the unique id corresponding to the enum attribute passed as argument.

llgo:link (*OpaqueAttributeRef).EnumAttributeKind C.LLVMGetEnumAttributeKind

func (*OpaqueAttributeRef) EnumAttributeValue

func (self *OpaqueAttributeRef) EnumAttributeValue() c.Uint64T

Get the enum attribute's value. 0 is returned if none exists.

llgo:link (*OpaqueAttributeRef).EnumAttributeValue C.LLVMGetEnumAttributeValue

func (*OpaqueAttributeRef) IsEnumAttribute

func (self *OpaqueAttributeRef) IsEnumAttribute() Bool

Check for the different types of attributes.

llgo:link (*OpaqueAttributeRef).IsEnumAttribute C.LLVMIsEnumAttribute

func (*OpaqueAttributeRef) IsStringAttribute

func (self *OpaqueAttributeRef) IsStringAttribute() Bool

llgo:link (*OpaqueAttributeRef).IsStringAttribute C.LLVMIsStringAttribute

func (*OpaqueAttributeRef) IsTypeAttribute

func (self *OpaqueAttributeRef) IsTypeAttribute() Bool

llgo:link (*OpaqueAttributeRef).IsTypeAttribute C.LLVMIsTypeAttribute

func (*OpaqueAttributeRef) StringAttributeKind

func (self *OpaqueAttributeRef) StringAttributeKind(Length *c.Uint) *c.Char

Get the string attribute's kind.

llgo:link (*OpaqueAttributeRef).StringAttributeKind C.LLVMGetStringAttributeKind

func (*OpaqueAttributeRef) StringAttributeValue

func (self *OpaqueAttributeRef) StringAttributeValue(Length *c.Uint) *c.Char

Get the string attribute's value.

llgo:link (*OpaqueAttributeRef).StringAttributeValue C.LLVMGetStringAttributeValue

func (*OpaqueAttributeRef) TypeAttributeValue

func (self *OpaqueAttributeRef) TypeAttributeValue() TypeRef

Get the type attribute's value.

llgo:link (*OpaqueAttributeRef).TypeAttributeValue C.LLVMGetTypeAttributeValue

type OpaqueBasicBlock

type OpaqueBasicBlock struct {
}

func (*OpaqueBasicBlock) BasicBlockAsValue

func (self *OpaqueBasicBlock) BasicBlockAsValue() ValueRef

Convert a basic block instance to a value type.

llgo:link (*OpaqueBasicBlock).BasicBlockAsValue C.LLVMBasicBlockAsValue

func (*OpaqueBasicBlock) BasicBlockName

func (self *OpaqueBasicBlock) BasicBlockName() *c.Char

Obtain the string name of a basic block.

llgo:link (*OpaqueBasicBlock).BasicBlockName C.LLVMGetBasicBlockName

func (*OpaqueBasicBlock) BasicBlockParent

func (self *OpaqueBasicBlock) BasicBlockParent() ValueRef

Obtain the function to which a basic block belongs.

@see llvm::BasicBlock::getParent()

llgo:link (*OpaqueBasicBlock).BasicBlockParent C.LLVMGetBasicBlockParent

func (*OpaqueBasicBlock) BasicBlockTerminator

func (self *OpaqueBasicBlock) BasicBlockTerminator() ValueRef

Obtain the terminator instruction for a basic block.

If the basic block does not have a terminator (it is not well-formed if it doesn't), then NULL is returned.

The returned LLVMValueRef corresponds to an llvm::Instruction.

@see llvm::BasicBlock::getTerminator()

llgo:link (*OpaqueBasicBlock).BasicBlockTerminator C.LLVMGetBasicBlockTerminator

func (*OpaqueBasicBlock) DeleteBasicBlock

func (self *OpaqueBasicBlock) DeleteBasicBlock()

Remove a basic block from a function and delete it.

This deletes the basic block from its containing function and deletes the basic block itself.

@see llvm::BasicBlock::eraseFromParent()

llgo:link (*OpaqueBasicBlock).DeleteBasicBlock C.LLVMDeleteBasicBlock

func (*OpaqueBasicBlock) FirstInstruction

func (self *OpaqueBasicBlock) FirstInstruction() ValueRef

Obtain the first instruction in a basic block.

The returned LLVMValueRef corresponds to a llvm::Instruction instance.

llgo:link (*OpaqueBasicBlock).FirstInstruction C.LLVMGetFirstInstruction

func (*OpaqueBasicBlock) InsertBasicBlock

func (self *OpaqueBasicBlock) InsertBasicBlock(Name *c.Char) BasicBlockRef

Insert a basic block in a function using the global context.

@see llvm::BasicBlock::Create()

llgo:link (*OpaqueBasicBlock).InsertBasicBlock C.LLVMInsertBasicBlock

func (*OpaqueBasicBlock) LastInstruction

func (self *OpaqueBasicBlock) LastInstruction() ValueRef

Obtain the last instruction in a basic block.

The returned LLVMValueRef corresponds to an LLVM:Instruction.

llgo:link (*OpaqueBasicBlock).LastInstruction C.LLVMGetLastInstruction

func (*OpaqueBasicBlock) NextBasicBlock

func (self *OpaqueBasicBlock) NextBasicBlock() BasicBlockRef

Advance a basic block iterator.

llgo:link (*OpaqueBasicBlock).NextBasicBlock C.LLVMGetNextBasicBlock

func (*OpaqueBasicBlock) PreviousBasicBlock

func (self *OpaqueBasicBlock) PreviousBasicBlock() BasicBlockRef

Go backwards in a basic block iterator.

llgo:link (*OpaqueBasicBlock).PreviousBasicBlock C.LLVMGetPreviousBasicBlock

func (*OpaqueBasicBlock) RemoveBasicBlockFromParent

func (self *OpaqueBasicBlock) RemoveBasicBlockFromParent()

Remove a basic block from a function.

This deletes the basic block from its containing function but keep the basic block alive.

@see llvm::BasicBlock::removeFromParent()

llgo:link (*OpaqueBasicBlock).RemoveBasicBlockFromParent C.LLVMRemoveBasicBlockFromParent

type OpaqueBinary

type OpaqueBinary struct {
}

func (*OpaqueBinary) CopyMemoryBuffer added in v0.2.0

func (self *OpaqueBinary) CopyMemoryBuffer() MemoryBufferRef

Retrieves a copy of the memory buffer associated with this object file.

The returned buffer is merely a shallow copy and does not own the actual backing buffer of the binary. Nevertheless, it is the responsibility of the caller to free it with \c LLVMDisposeMemoryBuffer.

@see llvm::object::getMemoryBufferRef

llgo:link (*OpaqueBinary).CopyMemoryBuffer C.LLVMBinaryCopyMemoryBuffer

func (*OpaqueBinary) Dispose added in v0.2.0

func (self *OpaqueBinary) Dispose()

Dispose of a binary file.

The binary file does not own its backing buffer. It is the responsibility of the caller to free it with \c LLVMDisposeMemoryBuffer.

llgo:link (*OpaqueBinary).Dispose C.LLVMDisposeBinary

func (*OpaqueBinary) MachOUniversalBinaryCopyObjectForArch

func (self *OpaqueBinary) MachOUniversalBinaryCopyObjectForArch(Arch *c.Char, ArchLen c.SizeT, ErrorMessage **c.Char) BinaryRef

llgo:link (*OpaqueBinary).MachOUniversalBinaryCopyObjectForArch C.LLVMMachOUniversalBinaryCopyObjectForArch

func (*OpaqueBinary) ObjectFileCopySectionIterator

func (self *OpaqueBinary) ObjectFileCopySectionIterator() SectionIteratorRef

Retrieve a copy of the section iterator for this object file.

If there are no sections, the result is NULL.

The returned iterator is merely a shallow copy. Nevertheless, it is the responsibility of the caller to free it with \c LLVMDisposeSectionIterator.

@see llvm::object::sections()

llgo:link (*OpaqueBinary).ObjectFileCopySectionIterator C.LLVMObjectFileCopySectionIterator

func (*OpaqueBinary) ObjectFileCopySymbolIterator

func (self *OpaqueBinary) ObjectFileCopySymbolIterator() SymbolIteratorRef

Retrieve a copy of the symbol iterator for this object file.

If there are no symbols, the result is NULL.

The returned iterator is merely a shallow copy. Nevertheless, it is the responsibility of the caller to free it with \c LLVMDisposeSymbolIterator.

@see llvm::object::symbols()

llgo:link (*OpaqueBinary).ObjectFileCopySymbolIterator C.LLVMObjectFileCopySymbolIterator

func (*OpaqueBinary) ObjectFileIsSectionIteratorAtEnd

func (self *OpaqueBinary) ObjectFileIsSectionIteratorAtEnd(SI SectionIteratorRef) Bool

Returns whether the given section iterator is at the end.

@see llvm::object::section_end

llgo:link (*OpaqueBinary).ObjectFileIsSectionIteratorAtEnd C.LLVMObjectFileIsSectionIteratorAtEnd

func (*OpaqueBinary) ObjectFileIsSymbolIteratorAtEnd

func (self *OpaqueBinary) ObjectFileIsSymbolIteratorAtEnd(SI SymbolIteratorRef) Bool

Returns whether the given symbol iterator is at the end.

@see llvm::object::symbol_end

llgo:link (*OpaqueBinary).ObjectFileIsSymbolIteratorAtEnd C.LLVMObjectFileIsSymbolIteratorAtEnd

func (*OpaqueBinary) Type added in v0.2.0

func (self *OpaqueBinary) Type() BinaryType

Retrieve the specific type of a binary.

@see llvm::object::Binary::getType

llgo:link (*OpaqueBinary).Type C.LLVMBinaryGetType

type OpaqueBuilder

type OpaqueBuilder struct {
}

func (*OpaqueBuilder) AddMetadataToInst

func (self *OpaqueBuilder) AddMetadataToInst(Inst ValueRef)

Adds the metadata registered with the given builder to the given instruction.

@see llvm::IRBuilder::AddMetadataToInst()

llgo:link (*OpaqueBuilder).AddMetadataToInst C.LLVMAddMetadataToInst

func (*OpaqueBuilder) BuildAShr

func (self *OpaqueBuilder) BuildAShr(LHS ValueRef, RHS ValueRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildAShr C.LLVMBuildAShr

func (*OpaqueBuilder) BuildAdd

func (self *OpaqueBuilder) BuildAdd(LHS ValueRef, RHS ValueRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildAdd C.LLVMBuildAdd

func (*OpaqueBuilder) BuildAddrSpaceCast

func (self *OpaqueBuilder) BuildAddrSpaceCast(Val ValueRef, DestTy TypeRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildAddrSpaceCast C.LLVMBuildAddrSpaceCast

func (*OpaqueBuilder) BuildAggregateRet

func (self *OpaqueBuilder) BuildAggregateRet(RetVals *ValueRef, N c.Uint) ValueRef

llgo:link (*OpaqueBuilder).BuildAggregateRet C.LLVMBuildAggregateRet

func (*OpaqueBuilder) BuildAlloca

func (self *OpaqueBuilder) BuildAlloca(Ty TypeRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildAlloca C.LLVMBuildAlloca

func (*OpaqueBuilder) BuildAnd

func (self *OpaqueBuilder) BuildAnd(LHS ValueRef, RHS ValueRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildAnd C.LLVMBuildAnd

func (*OpaqueBuilder) BuildArrayAlloca

func (self *OpaqueBuilder) BuildArrayAlloca(Ty TypeRef, Val ValueRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildArrayAlloca C.LLVMBuildArrayAlloca

func (*OpaqueBuilder) BuildArrayMalloc

func (self *OpaqueBuilder) BuildArrayMalloc(Ty TypeRef, Val ValueRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildArrayMalloc C.LLVMBuildArrayMalloc

func (*OpaqueBuilder) BuildAtomicCmpXchg

func (self *OpaqueBuilder) BuildAtomicCmpXchg(Ptr ValueRef, Cmp ValueRef, New ValueRef, SuccessOrdering AtomicOrdering, FailureOrdering AtomicOrdering, SingleThread Bool) ValueRef

llgo:link (*OpaqueBuilder).BuildAtomicCmpXchg C.LLVMBuildAtomicCmpXchg

func (*OpaqueBuilder) BuildAtomicCmpXchgSyncScope

func (self *OpaqueBuilder) BuildAtomicCmpXchgSyncScope(Ptr ValueRef, Cmp ValueRef, New ValueRef, SuccessOrdering AtomicOrdering, FailureOrdering AtomicOrdering, SSID c.Uint) ValueRef

llgo:link (*OpaqueBuilder).BuildAtomicCmpXchgSyncScope C.LLVMBuildAtomicCmpXchgSyncScope

func (*OpaqueBuilder) BuildAtomicRMW

func (self *OpaqueBuilder) BuildAtomicRMW(op AtomicRMWBinOp, PTR ValueRef, Val ValueRef, ordering AtomicOrdering, singleThread Bool) ValueRef

llgo:link (*OpaqueBuilder).BuildAtomicRMW C.LLVMBuildAtomicRMW

func (*OpaqueBuilder) BuildAtomicRMWSyncScope

func (self *OpaqueBuilder) BuildAtomicRMWSyncScope(op AtomicRMWBinOp, PTR ValueRef, Val ValueRef, ordering AtomicOrdering, SSID c.Uint) ValueRef

llgo:link (*OpaqueBuilder).BuildAtomicRMWSyncScope C.LLVMBuildAtomicRMWSyncScope

func (*OpaqueBuilder) BuildBinOp

func (self *OpaqueBuilder) BuildBinOp(Op Opcode, LHS ValueRef, RHS ValueRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildBinOp C.LLVMBuildBinOp

func (*OpaqueBuilder) BuildBitCast

func (self *OpaqueBuilder) BuildBitCast(Val ValueRef, DestTy TypeRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildBitCast C.LLVMBuildBitCast

func (*OpaqueBuilder) BuildBr

func (self *OpaqueBuilder) BuildBr(Dest BasicBlockRef) ValueRef

llgo:link (*OpaqueBuilder).BuildBr C.LLVMBuildBr

func (*OpaqueBuilder) BuildCall2

func (self *OpaqueBuilder) BuildCall2(_llcppg_param2 TypeRef, Fn ValueRef, Args *ValueRef, NumArgs c.Uint, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildCall2 C.LLVMBuildCall2

func (*OpaqueBuilder) BuildCallBr

func (self *OpaqueBuilder) BuildCallBr(Ty TypeRef, Fn ValueRef, DefaultDest BasicBlockRef, IndirectDests *BasicBlockRef, NumIndirectDests c.Uint, Args *ValueRef, NumArgs c.Uint, Bundles *OperandBundleRef, NumBundles c.Uint, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildCallBr C.LLVMBuildCallBr

func (*OpaqueBuilder) BuildCallWithOperandBundles

func (self *OpaqueBuilder) BuildCallWithOperandBundles(_llcppg_param2 TypeRef, Fn ValueRef, Args *ValueRef, NumArgs c.Uint, Bundles *OperandBundleRef, NumBundles c.Uint, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildCallWithOperandBundles C.LLVMBuildCallWithOperandBundles

func (*OpaqueBuilder) BuildCast

func (self *OpaqueBuilder) BuildCast(Op Opcode, Val ValueRef, DestTy TypeRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildCast C.LLVMBuildCast

func (*OpaqueBuilder) BuildCatchPad

func (self *OpaqueBuilder) BuildCatchPad(ParentPad ValueRef, Args *ValueRef, NumArgs c.Uint, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildCatchPad C.LLVMBuildCatchPad

func (*OpaqueBuilder) BuildCatchRet

func (self *OpaqueBuilder) BuildCatchRet(CatchPad ValueRef, BB BasicBlockRef) ValueRef

llgo:link (*OpaqueBuilder).BuildCatchRet C.LLVMBuildCatchRet

func (*OpaqueBuilder) BuildCatchSwitch

func (self *OpaqueBuilder) BuildCatchSwitch(ParentPad ValueRef, UnwindBB BasicBlockRef, NumHandlers c.Uint, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildCatchSwitch C.LLVMBuildCatchSwitch

func (*OpaqueBuilder) BuildCleanupPad

func (self *OpaqueBuilder) BuildCleanupPad(ParentPad ValueRef, Args *ValueRef, NumArgs c.Uint, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildCleanupPad C.LLVMBuildCleanupPad

func (*OpaqueBuilder) BuildCleanupRet

func (self *OpaqueBuilder) BuildCleanupRet(CatchPad ValueRef, BB BasicBlockRef) ValueRef

llgo:link (*OpaqueBuilder).BuildCleanupRet C.LLVMBuildCleanupRet

func (*OpaqueBuilder) BuildCondBr

func (self *OpaqueBuilder) BuildCondBr(If ValueRef, Then BasicBlockRef, Else BasicBlockRef) ValueRef

llgo:link (*OpaqueBuilder).BuildCondBr C.LLVMBuildCondBr

func (*OpaqueBuilder) BuildExactSDiv

func (self *OpaqueBuilder) BuildExactSDiv(LHS ValueRef, RHS ValueRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildExactSDiv C.LLVMBuildExactSDiv

func (*OpaqueBuilder) BuildExactUDiv

func (self *OpaqueBuilder) BuildExactUDiv(LHS ValueRef, RHS ValueRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildExactUDiv C.LLVMBuildExactUDiv

func (*OpaqueBuilder) BuildExtractElement

func (self *OpaqueBuilder) BuildExtractElement(VecVal ValueRef, Index ValueRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildExtractElement C.LLVMBuildExtractElement

func (*OpaqueBuilder) BuildExtractValue

func (self *OpaqueBuilder) BuildExtractValue(AggVal ValueRef, Index c.Uint, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildExtractValue C.LLVMBuildExtractValue

func (*OpaqueBuilder) BuildFAdd

func (self *OpaqueBuilder) BuildFAdd(LHS ValueRef, RHS ValueRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildFAdd C.LLVMBuildFAdd

func (*OpaqueBuilder) BuildFCmp

func (self *OpaqueBuilder) BuildFCmp(Op RealPredicate, LHS ValueRef, RHS ValueRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildFCmp C.LLVMBuildFCmp

func (*OpaqueBuilder) BuildFDiv

func (self *OpaqueBuilder) BuildFDiv(LHS ValueRef, RHS ValueRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildFDiv C.LLVMBuildFDiv

func (*OpaqueBuilder) BuildFMul

func (self *OpaqueBuilder) BuildFMul(LHS ValueRef, RHS ValueRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildFMul C.LLVMBuildFMul

func (*OpaqueBuilder) BuildFNeg

func (self *OpaqueBuilder) BuildFNeg(V ValueRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildFNeg C.LLVMBuildFNeg

func (*OpaqueBuilder) BuildFPCast

func (self *OpaqueBuilder) BuildFPCast(Val ValueRef, DestTy TypeRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildFPCast C.LLVMBuildFPCast

func (*OpaqueBuilder) BuildFPExt

func (self *OpaqueBuilder) BuildFPExt(Val ValueRef, DestTy TypeRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildFPExt C.LLVMBuildFPExt

func (*OpaqueBuilder) BuildFPToSI

func (self *OpaqueBuilder) BuildFPToSI(Val ValueRef, DestTy TypeRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildFPToSI C.LLVMBuildFPToSI

func (*OpaqueBuilder) BuildFPToUI

func (self *OpaqueBuilder) BuildFPToUI(Val ValueRef, DestTy TypeRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildFPToUI C.LLVMBuildFPToUI

func (*OpaqueBuilder) BuildFPTrunc

func (self *OpaqueBuilder) BuildFPTrunc(Val ValueRef, DestTy TypeRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildFPTrunc C.LLVMBuildFPTrunc

func (*OpaqueBuilder) BuildFRem

func (self *OpaqueBuilder) BuildFRem(LHS ValueRef, RHS ValueRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildFRem C.LLVMBuildFRem

func (*OpaqueBuilder) BuildFSub

func (self *OpaqueBuilder) BuildFSub(LHS ValueRef, RHS ValueRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildFSub C.LLVMBuildFSub

func (*OpaqueBuilder) BuildFence

func (self *OpaqueBuilder) BuildFence(ordering AtomicOrdering, singleThread Bool, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildFence C.LLVMBuildFence

func (*OpaqueBuilder) BuildFenceSyncScope

func (self *OpaqueBuilder) BuildFenceSyncScope(ordering AtomicOrdering, SSID c.Uint, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildFenceSyncScope C.LLVMBuildFenceSyncScope

func (*OpaqueBuilder) BuildFree

func (self *OpaqueBuilder) BuildFree(PointerVal ValueRef) ValueRef

llgo:link (*OpaqueBuilder).BuildFree C.LLVMBuildFree

func (*OpaqueBuilder) BuildFreeze

func (self *OpaqueBuilder) BuildFreeze(Val ValueRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildFreeze C.LLVMBuildFreeze

func (*OpaqueBuilder) BuildGEP2

func (self *OpaqueBuilder) BuildGEP2(Ty TypeRef, Pointer ValueRef, Indices *ValueRef, NumIndices c.Uint, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildGEP2 C.LLVMBuildGEP2

func (*OpaqueBuilder) BuildGEPWithNoWrapFlags

func (self *OpaqueBuilder) BuildGEPWithNoWrapFlags(Ty TypeRef, Pointer ValueRef, Indices *ValueRef, NumIndices c.Uint, Name *c.Char, NoWrapFlags GEPNoWrapFlags) ValueRef

Creates a GetElementPtr instruction. Similar to LLVMBuildGEP2, but allows specifying the no-wrap flags.

@see llvm::IRBuilder::CreateGEP()

llgo:link (*OpaqueBuilder).BuildGEPWithNoWrapFlags C.LLVMBuildGEPWithNoWrapFlags

func (*OpaqueBuilder) BuildGlobalString

func (self *OpaqueBuilder) BuildGlobalString(Str *c.Char, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildGlobalString C.LLVMBuildGlobalString

func (*OpaqueBuilder) BuildGlobalStringPtr deprecated

func (self *OpaqueBuilder) BuildGlobalStringPtr(Str *c.Char, Name *c.Char) ValueRef

Deprecated: Use LLVMBuildGlobalString instead, which has identical behavior.

llgo:link (*OpaqueBuilder).BuildGlobalStringPtr C.LLVMBuildGlobalStringPtr

func (*OpaqueBuilder) BuildICmp

func (self *OpaqueBuilder) BuildICmp(Op IntPredicate, LHS ValueRef, RHS ValueRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildICmp C.LLVMBuildICmp

func (*OpaqueBuilder) BuildInBoundsGEP2

func (self *OpaqueBuilder) BuildInBoundsGEP2(Ty TypeRef, Pointer ValueRef, Indices *ValueRef, NumIndices c.Uint, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildInBoundsGEP2 C.LLVMBuildInBoundsGEP2

func (*OpaqueBuilder) BuildIndirectBr

func (self *OpaqueBuilder) BuildIndirectBr(Addr ValueRef, NumDests c.Uint) ValueRef

llgo:link (*OpaqueBuilder).BuildIndirectBr C.LLVMBuildIndirectBr

func (*OpaqueBuilder) BuildInsertElement

func (self *OpaqueBuilder) BuildInsertElement(VecVal ValueRef, EltVal ValueRef, Index ValueRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildInsertElement C.LLVMBuildInsertElement

func (*OpaqueBuilder) BuildInsertValue

func (self *OpaqueBuilder) BuildInsertValue(AggVal ValueRef, EltVal ValueRef, Index c.Uint, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildInsertValue C.LLVMBuildInsertValue

func (*OpaqueBuilder) BuildIntCast deprecated

func (self *OpaqueBuilder) BuildIntCast(Val ValueRef, DestTy TypeRef, Name *c.Char) ValueRef

Deprecated: This cast is always signed. Use LLVMBuildIntCast2 instead.

llgo:link (*OpaqueBuilder).BuildIntCast C.LLVMBuildIntCast

func (*OpaqueBuilder) BuildIntCast2

func (self *OpaqueBuilder) BuildIntCast2(Val ValueRef, DestTy TypeRef, IsSigned Bool, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildIntCast2 C.LLVMBuildIntCast2

func (*OpaqueBuilder) BuildIntToPtr

func (self *OpaqueBuilder) BuildIntToPtr(Val ValueRef, DestTy TypeRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildIntToPtr C.LLVMBuildIntToPtr

func (*OpaqueBuilder) BuildInvoke2

func (self *OpaqueBuilder) BuildInvoke2(Ty TypeRef, Fn ValueRef, Args *ValueRef, NumArgs c.Uint, Then BasicBlockRef, Catch BasicBlockRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildInvoke2 C.LLVMBuildInvoke2

func (*OpaqueBuilder) BuildInvokeWithOperandBundles

func (self *OpaqueBuilder) BuildInvokeWithOperandBundles(Ty TypeRef, Fn ValueRef, Args *ValueRef, NumArgs c.Uint, Then BasicBlockRef, Catch BasicBlockRef, Bundles *OperandBundleRef, NumBundles c.Uint, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildInvokeWithOperandBundles C.LLVMBuildInvokeWithOperandBundles

func (*OpaqueBuilder) BuildIsNotNull

func (self *OpaqueBuilder) BuildIsNotNull(Val ValueRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildIsNotNull C.LLVMBuildIsNotNull

func (*OpaqueBuilder) BuildIsNull

func (self *OpaqueBuilder) BuildIsNull(Val ValueRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildIsNull C.LLVMBuildIsNull

func (*OpaqueBuilder) BuildLShr

func (self *OpaqueBuilder) BuildLShr(LHS ValueRef, RHS ValueRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildLShr C.LLVMBuildLShr

func (*OpaqueBuilder) BuildLandingPad

func (self *OpaqueBuilder) BuildLandingPad(Ty TypeRef, PersFn ValueRef, NumClauses c.Uint, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildLandingPad C.LLVMBuildLandingPad

func (*OpaqueBuilder) BuildLoad2

func (self *OpaqueBuilder) BuildLoad2(Ty TypeRef, PointerVal ValueRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildLoad2 C.LLVMBuildLoad2

func (*OpaqueBuilder) BuildMalloc

func (self *OpaqueBuilder) BuildMalloc(Ty TypeRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildMalloc C.LLVMBuildMalloc

func (*OpaqueBuilder) BuildMemCpy

func (self *OpaqueBuilder) BuildMemCpy(Dst ValueRef, DstAlign c.Uint, Src ValueRef, SrcAlign c.Uint, Size ValueRef) ValueRef

Creates and inserts a memcpy between the specified pointers.

@see llvm::IRRBuilder::CreateMemCpy()

llgo:link (*OpaqueBuilder).BuildMemCpy C.LLVMBuildMemCpy

func (*OpaqueBuilder) BuildMemMove

func (self *OpaqueBuilder) BuildMemMove(Dst ValueRef, DstAlign c.Uint, Src ValueRef, SrcAlign c.Uint, Size ValueRef) ValueRef

Creates and inserts a memmove between the specified pointers.

@see llvm::IRRBuilder::CreateMemMove()

llgo:link (*OpaqueBuilder).BuildMemMove C.LLVMBuildMemMove

func (*OpaqueBuilder) BuildMemSet

func (self *OpaqueBuilder) BuildMemSet(Ptr ValueRef, Val ValueRef, Len ValueRef, Align c.Uint) ValueRef

Creates and inserts a memset to the specified pointer and the specified value.

@see llvm::IRRBuilder::CreateMemSet()

llgo:link (*OpaqueBuilder).BuildMemSet C.LLVMBuildMemSet

func (*OpaqueBuilder) BuildMul

func (self *OpaqueBuilder) BuildMul(LHS ValueRef, RHS ValueRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildMul C.LLVMBuildMul

func (*OpaqueBuilder) BuildNSWAdd

func (self *OpaqueBuilder) BuildNSWAdd(LHS ValueRef, RHS ValueRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildNSWAdd C.LLVMBuildNSWAdd

func (*OpaqueBuilder) BuildNSWMul

func (self *OpaqueBuilder) BuildNSWMul(LHS ValueRef, RHS ValueRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildNSWMul C.LLVMBuildNSWMul

func (*OpaqueBuilder) BuildNSWNeg

func (self *OpaqueBuilder) BuildNSWNeg(V ValueRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildNSWNeg C.LLVMBuildNSWNeg

func (*OpaqueBuilder) BuildNSWSub

func (self *OpaqueBuilder) BuildNSWSub(LHS ValueRef, RHS ValueRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildNSWSub C.LLVMBuildNSWSub

func (*OpaqueBuilder) BuildNUWAdd

func (self *OpaqueBuilder) BuildNUWAdd(LHS ValueRef, RHS ValueRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildNUWAdd C.LLVMBuildNUWAdd

func (*OpaqueBuilder) BuildNUWMul

func (self *OpaqueBuilder) BuildNUWMul(LHS ValueRef, RHS ValueRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildNUWMul C.LLVMBuildNUWMul

func (*OpaqueBuilder) BuildNUWNeg

func (self *OpaqueBuilder) BuildNUWNeg(V ValueRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildNUWNeg C.LLVMBuildNUWNeg

func (*OpaqueBuilder) BuildNUWSub

func (self *OpaqueBuilder) BuildNUWSub(LHS ValueRef, RHS ValueRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildNUWSub C.LLVMBuildNUWSub

func (*OpaqueBuilder) BuildNeg

func (self *OpaqueBuilder) BuildNeg(V ValueRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildNeg C.LLVMBuildNeg

func (*OpaqueBuilder) BuildNot

func (self *OpaqueBuilder) BuildNot(V ValueRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildNot C.LLVMBuildNot

func (*OpaqueBuilder) BuildOr

func (self *OpaqueBuilder) BuildOr(LHS ValueRef, RHS ValueRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildOr C.LLVMBuildOr

func (*OpaqueBuilder) BuildPhi

func (self *OpaqueBuilder) BuildPhi(Ty TypeRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildPhi C.LLVMBuildPhi

func (*OpaqueBuilder) BuildPointerCast

func (self *OpaqueBuilder) BuildPointerCast(Val ValueRef, DestTy TypeRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildPointerCast C.LLVMBuildPointerCast

func (*OpaqueBuilder) BuildPtrDiff2

func (self *OpaqueBuilder) BuildPtrDiff2(ElemTy TypeRef, LHS ValueRef, RHS ValueRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildPtrDiff2 C.LLVMBuildPtrDiff2

func (*OpaqueBuilder) BuildPtrToInt

func (self *OpaqueBuilder) BuildPtrToInt(Val ValueRef, DestTy TypeRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildPtrToInt C.LLVMBuildPtrToInt

func (*OpaqueBuilder) BuildResume

func (self *OpaqueBuilder) BuildResume(Exn ValueRef) ValueRef

llgo:link (*OpaqueBuilder).BuildResume C.LLVMBuildResume

func (*OpaqueBuilder) BuildRet

func (self *OpaqueBuilder) BuildRet(V ValueRef) ValueRef

llgo:link (*OpaqueBuilder).BuildRet C.LLVMBuildRet

func (*OpaqueBuilder) BuildRetVoid

func (self *OpaqueBuilder) BuildRetVoid() ValueRef

llgo:link (*OpaqueBuilder).BuildRetVoid C.LLVMBuildRetVoid

func (*OpaqueBuilder) BuildSDiv

func (self *OpaqueBuilder) BuildSDiv(LHS ValueRef, RHS ValueRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildSDiv C.LLVMBuildSDiv

func (*OpaqueBuilder) BuildSExt

func (self *OpaqueBuilder) BuildSExt(Val ValueRef, DestTy TypeRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildSExt C.LLVMBuildSExt

func (*OpaqueBuilder) BuildSExtOrBitCast

func (self *OpaqueBuilder) BuildSExtOrBitCast(Val ValueRef, DestTy TypeRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildSExtOrBitCast C.LLVMBuildSExtOrBitCast

func (*OpaqueBuilder) BuildSIToFP

func (self *OpaqueBuilder) BuildSIToFP(Val ValueRef, DestTy TypeRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildSIToFP C.LLVMBuildSIToFP

func (*OpaqueBuilder) BuildSRem

func (self *OpaqueBuilder) BuildSRem(LHS ValueRef, RHS ValueRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildSRem C.LLVMBuildSRem

func (*OpaqueBuilder) BuildSelect

func (self *OpaqueBuilder) BuildSelect(If ValueRef, Then ValueRef, Else ValueRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildSelect C.LLVMBuildSelect

func (*OpaqueBuilder) BuildShl

func (self *OpaqueBuilder) BuildShl(LHS ValueRef, RHS ValueRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildShl C.LLVMBuildShl

func (*OpaqueBuilder) BuildShuffleVector

func (self *OpaqueBuilder) BuildShuffleVector(V1 ValueRef, V2 ValueRef, Mask ValueRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildShuffleVector C.LLVMBuildShuffleVector

func (*OpaqueBuilder) BuildStore

func (self *OpaqueBuilder) BuildStore(Val ValueRef, Ptr ValueRef) ValueRef

llgo:link (*OpaqueBuilder).BuildStore C.LLVMBuildStore

func (*OpaqueBuilder) BuildStructGEP2

func (self *OpaqueBuilder) BuildStructGEP2(Ty TypeRef, Pointer ValueRef, Idx c.Uint, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildStructGEP2 C.LLVMBuildStructGEP2

func (*OpaqueBuilder) BuildSub

func (self *OpaqueBuilder) BuildSub(LHS ValueRef, RHS ValueRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildSub C.LLVMBuildSub

func (*OpaqueBuilder) BuildSwitch

func (self *OpaqueBuilder) BuildSwitch(V ValueRef, Else BasicBlockRef, NumCases c.Uint) ValueRef

llgo:link (*OpaqueBuilder).BuildSwitch C.LLVMBuildSwitch

func (*OpaqueBuilder) BuildTrunc

func (self *OpaqueBuilder) BuildTrunc(Val ValueRef, DestTy TypeRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildTrunc C.LLVMBuildTrunc

func (*OpaqueBuilder) BuildTruncOrBitCast

func (self *OpaqueBuilder) BuildTruncOrBitCast(Val ValueRef, DestTy TypeRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildTruncOrBitCast C.LLVMBuildTruncOrBitCast

func (*OpaqueBuilder) BuildUDiv

func (self *OpaqueBuilder) BuildUDiv(LHS ValueRef, RHS ValueRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildUDiv C.LLVMBuildUDiv

func (*OpaqueBuilder) BuildUIToFP

func (self *OpaqueBuilder) BuildUIToFP(Val ValueRef, DestTy TypeRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildUIToFP C.LLVMBuildUIToFP

func (*OpaqueBuilder) BuildURem

func (self *OpaqueBuilder) BuildURem(LHS ValueRef, RHS ValueRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildURem C.LLVMBuildURem

func (*OpaqueBuilder) BuildUnreachable

func (self *OpaqueBuilder) BuildUnreachable() ValueRef

llgo:link (*OpaqueBuilder).BuildUnreachable C.LLVMBuildUnreachable

func (*OpaqueBuilder) BuildVAArg

func (self *OpaqueBuilder) BuildVAArg(List ValueRef, Ty TypeRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildVAArg C.LLVMBuildVAArg

func (*OpaqueBuilder) BuildXor

func (self *OpaqueBuilder) BuildXor(LHS ValueRef, RHS ValueRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildXor C.LLVMBuildXor

func (*OpaqueBuilder) BuildZExt

func (self *OpaqueBuilder) BuildZExt(Val ValueRef, DestTy TypeRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildZExt C.LLVMBuildZExt

func (*OpaqueBuilder) BuildZExtOrBitCast

func (self *OpaqueBuilder) BuildZExtOrBitCast(Val ValueRef, DestTy TypeRef, Name *c.Char) ValueRef

llgo:link (*OpaqueBuilder).BuildZExtOrBitCast C.LLVMBuildZExtOrBitCast

func (*OpaqueBuilder) BuilderContext

func (self *OpaqueBuilder) BuilderContext() ContextRef

Obtain the context to which this builder is associated.

@see llvm::IRBuilder::getContext()

llgo:link (*OpaqueBuilder).BuilderContext C.LLVMGetBuilderContext

func (*OpaqueBuilder) BuilderGetDefaultFPMathTag

func (self *OpaqueBuilder) BuilderGetDefaultFPMathTag() MetadataRef

Get the dafult floating-point math metadata for a given builder.

@see llvm::IRBuilder::getDefaultFPMathTag()

llgo:link (*OpaqueBuilder).BuilderGetDefaultFPMathTag C.LLVMBuilderGetDefaultFPMathTag

func (*OpaqueBuilder) BuilderSetDefaultFPMathTag

func (self *OpaqueBuilder) BuilderSetDefaultFPMathTag(FPMathTag MetadataRef)

Set the default floating-point math metadata for the given builder.

To clear the metadata, pass NULL to \p FPMathTag.

@see llvm::IRBuilder::setDefaultFPMathTag()

llgo:link (*OpaqueBuilder).BuilderSetDefaultFPMathTag C.LLVMBuilderSetDefaultFPMathTag

func (*OpaqueBuilder) ClearInsertionPosition

func (self *OpaqueBuilder) ClearInsertionPosition()

llgo:link (*OpaqueBuilder).ClearInsertionPosition C.LLVMClearInsertionPosition

func (*OpaqueBuilder) CurrentDebugLocation deprecated

func (self *OpaqueBuilder) CurrentDebugLocation() ValueRef

Deprecated: Returning the NULL location will crash. Use LLVMGetCurrentDebugLocation2 instead.

llgo:link (*OpaqueBuilder).CurrentDebugLocation C.LLVMGetCurrentDebugLocation

func (*OpaqueBuilder) CurrentDebugLocation2

func (self *OpaqueBuilder) CurrentDebugLocation2() MetadataRef

Get location information used by debugging information.

@see llvm::IRBuilder::getCurrentDebugLocation()

llgo:link (*OpaqueBuilder).CurrentDebugLocation2 C.LLVMGetCurrentDebugLocation2

func (*OpaqueBuilder) DisposeBuilder

func (self *OpaqueBuilder) DisposeBuilder()

llgo:link (*OpaqueBuilder).DisposeBuilder C.LLVMDisposeBuilder

func (*OpaqueBuilder) InsertBlock

func (self *OpaqueBuilder) InsertBlock() BasicBlockRef

llgo:link (*OpaqueBuilder).InsertBlock C.LLVMGetInsertBlock

func (*OpaqueBuilder) InsertExistingBasicBlockAfterInsertBlock

func (self *OpaqueBuilder) InsertExistingBasicBlockAfterInsertBlock(BB BasicBlockRef)

Insert the given basic block after the insertion point of the given builder.

The insertion point must be valid.

@see llvm::Function::BasicBlockListType::insertAfter()

llgo:link (*OpaqueBuilder).InsertExistingBasicBlockAfterInsertBlock C.LLVMInsertExistingBasicBlockAfterInsertBlock

func (*OpaqueBuilder) InsertIntoBuilder

func (self *OpaqueBuilder) InsertIntoBuilder(Instr ValueRef)

llgo:link (*OpaqueBuilder).InsertIntoBuilder C.LLVMInsertIntoBuilder

func (*OpaqueBuilder) InsertIntoBuilderWithName

func (self *OpaqueBuilder) InsertIntoBuilderWithName(Instr ValueRef, Name *c.Char)

llgo:link (*OpaqueBuilder).InsertIntoBuilderWithName C.LLVMInsertIntoBuilderWithName

func (*OpaqueBuilder) PositionBuilder

func (self *OpaqueBuilder) PositionBuilder(Block BasicBlockRef, Instr ValueRef)

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.

llgo:link (*OpaqueBuilder).PositionBuilder C.LLVMPositionBuilder

func (*OpaqueBuilder) PositionBuilderAtEnd

func (self *OpaqueBuilder) PositionBuilderAtEnd(Block BasicBlockRef)

llgo:link (*OpaqueBuilder).PositionBuilderAtEnd C.LLVMPositionBuilderAtEnd

func (*OpaqueBuilder) PositionBuilderBefore

func (self *OpaqueBuilder) PositionBuilderBefore(Instr ValueRef)

Set the builder position before Instr but after any attached debug records.

llgo:link (*OpaqueBuilder).PositionBuilderBefore C.LLVMPositionBuilderBefore

func (*OpaqueBuilder) PositionBuilderBeforeDbgRecords

func (self *OpaqueBuilder) PositionBuilderBeforeDbgRecords(Block BasicBlockRef, Inst ValueRef)

Set the builder position before Instr and any attached debug records, or if Instr is null set the position to the end of Block.

llgo:link (*OpaqueBuilder).PositionBuilderBeforeDbgRecords C.LLVMPositionBuilderBeforeDbgRecords

func (*OpaqueBuilder) PositionBuilderBeforeInstrAndDbgRecords

func (self *OpaqueBuilder) PositionBuilderBeforeInstrAndDbgRecords(Instr ValueRef)

Set the builder position before Instr and any attached debug records.

llgo:link (*OpaqueBuilder).PositionBuilderBeforeInstrAndDbgRecords C.LLVMPositionBuilderBeforeInstrAndDbgRecords

func (*OpaqueBuilder) SetCurrentDebugLocation deprecated

func (self *OpaqueBuilder) SetCurrentDebugLocation(L ValueRef)

Deprecated: Passing the NULL location will crash. Use LLVMGetCurrentDebugLocation2 instead.

llgo:link (*OpaqueBuilder).SetCurrentDebugLocation C.LLVMSetCurrentDebugLocation

func (*OpaqueBuilder) SetCurrentDebugLocation2

func (self *OpaqueBuilder) SetCurrentDebugLocation2(Loc MetadataRef)

Set location information used by debugging information.

To clear the location metadata of the given instruction, pass NULL to \p Loc.

@see llvm::IRBuilder::SetCurrentDebugLocation()

llgo:link (*OpaqueBuilder).SetCurrentDebugLocation2 C.LLVMSetCurrentDebugLocation2

func (*OpaqueBuilder) SetInstDebugLocation

func (self *OpaqueBuilder) SetInstDebugLocation(Inst ValueRef)

Attempts to set the debug location for the given instruction using the current debug location for the given builder. If the builder has no current debug location, this function is a no-op.

@deprecated LLVMSetInstDebugLocation is deprecated in favor of the more general

LLVMAddMetadataToInst.

@see llvm::IRBuilder::SetInstDebugLocation()

llgo:link (*OpaqueBuilder).SetInstDebugLocation C.LLVMSetInstDebugLocation

type OpaqueContext

type OpaqueContext struct {
}

func (*OpaqueContext) AppendBasicBlockInContext

func (self *OpaqueContext) AppendBasicBlockInContext(Fn ValueRef, Name *c.Char) BasicBlockRef

Append a basic block to the end of a function.

@see llvm::BasicBlock::Create()

llgo:link (*OpaqueContext).AppendBasicBlockInContext C.LLVMAppendBasicBlockInContext

func (*OpaqueContext) BFloatTypeInContext

func (self *OpaqueContext) BFloatTypeInContext() TypeRef

Obtain a 16-bit brain floating point type from a context.

llgo:link (*OpaqueContext).BFloatTypeInContext C.LLVMBFloatTypeInContext

func (*OpaqueContext) BitcodeModuleInContext

func (self *OpaqueContext) BitcodeModuleInContext(MemBuf MemoryBufferRef, OutM *ModuleRef, OutMessage **c.Char) Bool

Reads a module from the specified path, returning via the OutMP parameter a module provider which performs lazy deserialization. Returns 0 on success. Optionally returns a human-readable error message via OutMessage. This is deprecated. Use LLVMGetBitcodeModuleInContext2.

llgo:link (*OpaqueContext).BitcodeModuleInContext C.LLVMGetBitcodeModuleInContext

func (*OpaqueContext) BitcodeModuleInContext2

func (self *OpaqueContext) BitcodeModuleInContext2(MemBuf MemoryBufferRef, OutM *ModuleRef) Bool

Reads a module from the given memory buffer, returning via the OutMP parameter a module provider which performs lazy deserialization.

Returns 0 on success.

Takes ownership of \p MemBuf if (and only if) the module was read successfully.

llgo:link (*OpaqueContext).BitcodeModuleInContext2 C.LLVMGetBitcodeModuleInContext2

func (*OpaqueContext) ConstStringInContext

func (self *OpaqueContext) ConstStringInContext(Str *c.Char, Length c.Uint, DontNullTerminate Bool) ValueRef

Create a ConstantDataSequential and initialize it with a string.

@deprecated LLVMConstStringInContext is deprecated in favor of the API accurate LLVMConstStringInContext2 @see llvm::ConstantDataArray::getString()

llgo:link (*OpaqueContext).ConstStringInContext C.LLVMConstStringInContext

func (*OpaqueContext) ConstStringInContext2

func (self *OpaqueContext) ConstStringInContext2(Str *c.Char, Length c.SizeT, DontNullTerminate Bool) ValueRef

Create a ConstantDataSequential and initialize it with a string.

@see llvm::ConstantDataArray::getString()

llgo:link (*OpaqueContext).ConstStringInContext2 C.LLVMConstStringInContext2

func (*OpaqueContext) ConstStructInContext

func (self *OpaqueContext) ConstStructInContext(ConstantVals *ValueRef, Count c.Uint, Packed Bool) ValueRef

Create an anonymous ConstantStruct with the specified values.

@see llvm::ConstantStruct::getAnon()

llgo:link (*OpaqueContext).ConstStructInContext C.LLVMConstStructInContext

func (*OpaqueContext) ContextDispose

func (self *OpaqueContext) ContextDispose()

Destroy a context instance.

This should be called for every call to LLVMContextCreate() or memory will be leaked.

llgo:link (*OpaqueContext).ContextDispose C.LLVMContextDispose

func (*OpaqueContext) ContextGetDiagnosticContext

func (self *OpaqueContext) ContextGetDiagnosticContext() unsafe.Pointer

Get the diagnostic context of this context.

llgo:link (*OpaqueContext).ContextGetDiagnosticContext C.LLVMContextGetDiagnosticContext

func (*OpaqueContext) ContextSetDiscardValueNames

func (self *OpaqueContext) ContextSetDiscardValueNames(Discard Bool)

Set whether the given context discards all value names.

If true, only the names of GlobalValue objects will be available in the IR. This can be used to save memory and runtime, especially in release mode.

@see LLVMContext::setDiscardValueNames()

llgo:link (*OpaqueContext).ContextSetDiscardValueNames C.LLVMContextSetDiscardValueNames

func (*OpaqueContext) ContextShouldDiscardValueNames

func (self *OpaqueContext) ContextShouldDiscardValueNames() Bool

Retrieve whether the given context is set to discard all value names.

@see LLVMContext::shouldDiscardValueNames()

llgo:link (*OpaqueContext).ContextShouldDiscardValueNames C.LLVMContextShouldDiscardValueNames

func (*OpaqueContext) CreateBasicBlockInContext

func (self *OpaqueContext) CreateBasicBlockInContext(Name *c.Char) BasicBlockRef

Create a new basic block without inserting it into a function.

@see llvm::BasicBlock::Create()

llgo:link (*OpaqueContext).CreateBasicBlockInContext C.LLVMCreateBasicBlockInContext

func (*OpaqueContext) CreateBuilderInContext

func (self *OpaqueContext) CreateBuilderInContext() BuilderRef

@defgroup LLVMCCoreInstructionBuilder Instruction Builders

An instruction builder represents a point within a basic block and is the exclusive means of building instructions using the C interface.

@{

llgo:link (*OpaqueContext).CreateBuilderInContext C.LLVMCreateBuilderInContext

func (*OpaqueContext) CreateConstantRangeAttribute

func (self *OpaqueContext) CreateConstantRangeAttribute(KindID c.Uint, NumBits c.Uint, LowerWords *c.Uint64T, UpperWords *c.Uint64T) AttributeRef

Create a ConstantRange attribute.

LowerWords and UpperWords need to be NumBits divided by 64 rounded up elements long.

llgo:link (*OpaqueContext).CreateConstantRangeAttribute C.LLVMCreateConstantRangeAttribute

func (*OpaqueContext) CreateEnumAttribute

func (self *OpaqueContext) CreateEnumAttribute(KindID c.Uint, Val c.Uint64T) AttributeRef

Create an enum attribute.

llgo:link (*OpaqueContext).CreateEnumAttribute C.LLVMCreateEnumAttribute

func (*OpaqueContext) CreateStringAttribute

func (self *OpaqueContext) CreateStringAttribute(K *c.Char, KLength c.Uint, V *c.Char, VLength c.Uint) AttributeRef

Create a string attribute.

llgo:link (*OpaqueContext).CreateStringAttribute C.LLVMCreateStringAttribute

func (*OpaqueContext) CreateTypeAttribute

func (self *OpaqueContext) CreateTypeAttribute(KindID c.Uint, type_ref TypeRef) AttributeRef

Create a type attribute

llgo:link (*OpaqueContext).CreateTypeAttribute C.LLVMCreateTypeAttribute

func (*OpaqueContext) DIBuilderCreateDebugLocation

func (self *OpaqueContext) DIBuilderCreateDebugLocation(Line c.Uint, Column c.Uint, Scope MetadataRef, InlinedAt MetadataRef) MetadataRef

Creates a new DebugLocation that describes a source location. \param Line The line in the source file. \param Column The column in the source file. \param Scope The scope in which the location resides. \param InlinedAt The scope where this location was inlined, if at all.

(optional).

\note If the item to which this location is attached cannot be

attributed to a source line, pass 0 for the line and column.

llgo:link (*OpaqueContext).DIBuilderCreateDebugLocation C.LLVMDIBuilderCreateDebugLocation

func (*OpaqueContext) DoubleTypeInContext

func (self *OpaqueContext) DoubleTypeInContext() TypeRef

Obtain a 64-bit floating point type from a context.

llgo:link (*OpaqueContext).DoubleTypeInContext C.LLVMDoubleTypeInContext

func (*OpaqueContext) FP128TypeInContext

func (self *OpaqueContext) FP128TypeInContext() TypeRef

Obtain a 128-bit floating point type (112-bit mantissa) from a context.

llgo:link (*OpaqueContext).FP128TypeInContext C.LLVMFP128TypeInContext

func (*OpaqueContext) FloatTypeInContext

func (self *OpaqueContext) FloatTypeInContext() TypeRef

Obtain a 32-bit floating point type from a context.

llgo:link (*OpaqueContext).FloatTypeInContext C.LLVMFloatTypeInContext

func (*OpaqueContext) HalfTypeInContext

func (self *OpaqueContext) HalfTypeInContext() TypeRef

Obtain a 16-bit floating point type from a context.

llgo:link (*OpaqueContext).HalfTypeInContext C.LLVMHalfTypeInContext

func (*OpaqueContext) InsertBasicBlockInContext

func (self *OpaqueContext) InsertBasicBlockInContext(BB BasicBlockRef, Name *c.Char) BasicBlockRef

Insert a basic block in a function before another basic block.

The function to add to is determined by the function of the passed basic block.

@see llvm::BasicBlock::Create()

llgo:link (*OpaqueContext).InsertBasicBlockInContext C.LLVMInsertBasicBlockInContext

func (*OpaqueContext) Int1TypeInContext

func (self *OpaqueContext) Int1TypeInContext() TypeRef

Obtain an integer type from a context with specified bit width.

llgo:link (*OpaqueContext).Int1TypeInContext C.LLVMInt1TypeInContext

func (*OpaqueContext) Int8TypeInContext

func (self *OpaqueContext) Int8TypeInContext() TypeRef

llgo:link (*OpaqueContext).Int8TypeInContext C.LLVMInt8TypeInContext

func (*OpaqueContext) Int16TypeInContext

func (self *OpaqueContext) Int16TypeInContext() TypeRef

llgo:link (*OpaqueContext).Int16TypeInContext C.LLVMInt16TypeInContext

func (*OpaqueContext) Int32TypeInContext

func (self *OpaqueContext) Int32TypeInContext() TypeRef

llgo:link (*OpaqueContext).Int32TypeInContext C.LLVMInt32TypeInContext

func (*OpaqueContext) Int64TypeInContext

func (self *OpaqueContext) Int64TypeInContext() TypeRef

llgo:link (*OpaqueContext).Int64TypeInContext C.LLVMInt64TypeInContext

func (*OpaqueContext) Int128TypeInContext

func (self *OpaqueContext) Int128TypeInContext() TypeRef

llgo:link (*OpaqueContext).Int128TypeInContext C.LLVMInt128TypeInContext

func (*OpaqueContext) IntPtrTypeForASInContext

func (self *OpaqueContext) IntPtrTypeForASInContext(TD TargetDataRef, AS c.Uint) TypeRef

Returns the integer type that is the same size as a pointer on a target. This version allows the address space to be specified. See the method llvm::DataLayout::getIntPtrType.

llgo:link (*OpaqueContext).IntPtrTypeForASInContext C.LLVMIntPtrTypeForASInContext

func (*OpaqueContext) IntPtrTypeInContext

func (self *OpaqueContext) IntPtrTypeInContext(TD TargetDataRef) TypeRef

Returns the integer type that is the same size as a pointer on a target. See the method llvm::DataLayout::getIntPtrType.

llgo:link (*OpaqueContext).IntPtrTypeInContext C.LLVMIntPtrTypeInContext

func (*OpaqueContext) IntTypeInContext

func (self *OpaqueContext) IntTypeInContext(NumBits c.Uint) TypeRef

llgo:link (*OpaqueContext).IntTypeInContext C.LLVMIntTypeInContext

func (*OpaqueContext) IntrinsicGetType

func (self *OpaqueContext) IntrinsicGetType(ID c.Uint, ParamTypes *TypeRef, ParamCount c.SizeT) TypeRef

Retrieves the type of an intrinsic. For overloaded intrinsics, parameter types must be provided to uniquely identify an overload.

@see llvm::Intrinsic::getType()

llgo:link (*OpaqueContext).IntrinsicGetType C.LLVMIntrinsicGetType

func (*OpaqueContext) LabelTypeInContext

func (self *OpaqueContext) LabelTypeInContext() TypeRef

Create a label type in a context.

llgo:link (*OpaqueContext).LabelTypeInContext C.LLVMLabelTypeInContext

func (*OpaqueContext) MDKindIDInContext

func (self *OpaqueContext) MDKindIDInContext(Name *c.Char, SLen c.Uint) c.Uint

llgo:link (*OpaqueContext).MDKindIDInContext C.LLVMGetMDKindIDInContext

func (*OpaqueContext) MDNodeInContext deprecated

func (self *OpaqueContext) MDNodeInContext(Vals *ValueRef, Count c.Uint) ValueRef

Deprecated: Use LLVMMDNodeInContext2 instead.

llgo:link (*OpaqueContext).MDNodeInContext C.LLVMMDNodeInContext

func (*OpaqueContext) MDNodeInContext2

func (self *OpaqueContext) MDNodeInContext2(MDs *MetadataRef, Count c.SizeT) MetadataRef

Create an MDNode value with the given array of operands.

@see llvm::MDNode::get()

llgo:link (*OpaqueContext).MDNodeInContext2 C.LLVMMDNodeInContext2

func (*OpaqueContext) MDStringInContext deprecated

func (self *OpaqueContext) MDStringInContext(Str *c.Char, SLen c.Uint) ValueRef

Deprecated: Use LLVMMDStringInContext2 instead.

llgo:link (*OpaqueContext).MDStringInContext C.LLVMMDStringInContext

func (*OpaqueContext) MDStringInContext2

func (self *OpaqueContext) MDStringInContext2(Str *c.Char, SLen c.SizeT) MetadataRef

Create an MDString value from a given string value.

The MDString value does not take ownership of the given string, it remains the responsibility of the caller to free it.

@see llvm::MDString::get()

llgo:link (*OpaqueContext).MDStringInContext2 C.LLVMMDStringInContext2

func (*OpaqueContext) MetadataAsValue

func (self *OpaqueContext) MetadataAsValue(MD MetadataRef) ValueRef

Obtain a Metadata as a Value.

llgo:link (*OpaqueContext).MetadataAsValue C.LLVMMetadataAsValue

func (*OpaqueContext) MetadataTypeInContext

func (self *OpaqueContext) MetadataTypeInContext() TypeRef

Create a metadata type in a context.

llgo:link (*OpaqueContext).MetadataTypeInContext C.LLVMMetadataTypeInContext

func (*OpaqueContext) OrcCreateNewThreadSafeContextFromLLVMContext

func (self *OpaqueContext) OrcCreateNewThreadSafeContextFromLLVMContext() OrcThreadSafeContextRef

Create a ThreadSafeContextRef from a given LLVMContext, which must not be associated with any existing ThreadSafeContext.

The underlying ThreadSafeContext will take ownership of the LLVMContext object, so clients should not free the LLVMContext passed to this function.

Ownership of the underlying ThreadSafeContext data is shared: Clients can and should dispose of their ThreadSafeContextRef as soon as they no longer need to refer to it directly. Other references (e.g. from ThreadSafeModules) will keep the underlying data alive as long as it is needed.

llgo:link (*OpaqueContext).OrcCreateNewThreadSafeContextFromLLVMContext C.LLVMOrcCreateNewThreadSafeContextFromLLVMContext

func (*OpaqueContext) PPCFP128TypeInContext

func (self *OpaqueContext) PPCFP128TypeInContext() TypeRef

Obtain a 128-bit floating point type (two 64-bits) from a context.

llgo:link (*OpaqueContext).PPCFP128TypeInContext C.LLVMPPCFP128TypeInContext

func (*OpaqueContext) ParseBitcodeInContext

func (self *OpaqueContext) ParseBitcodeInContext(MemBuf MemoryBufferRef, OutModule *ModuleRef, OutMessage **c.Char) Bool

llgo:link (*OpaqueContext).ParseBitcodeInContext C.LLVMParseBitcodeInContext

func (*OpaqueContext) ParseBitcodeInContext2

func (self *OpaqueContext) ParseBitcodeInContext2(MemBuf MemoryBufferRef, OutModule *ModuleRef) Bool

llgo:link (*OpaqueContext).ParseBitcodeInContext2 C.LLVMParseBitcodeInContext2

func (*OpaqueContext) ParseIRInContext

func (self *OpaqueContext) ParseIRInContext(MemBuf MemoryBufferRef, OutM *ModuleRef, OutMessage **c.Char) Bool

Read LLVM IR from a memory buffer and convert it into an in-memory Module object. Returns 0 on success. Optionally returns a human-readable description of any errors that occurred during parsing IR. OutMessage must be disposed with LLVMDisposeMessage. The memory buffer is consumed by this function. This is deprecated. Use LLVMParseIRInContext2 instead.

@see llvm::ParseIR()

llgo:link (*OpaqueContext).ParseIRInContext C.LLVMParseIRInContext

func (*OpaqueContext) ParseIRInContext2

func (self *OpaqueContext) ParseIRInContext2(MemBuf MemoryBufferRef, OutM *ModuleRef, OutMessage **c.Char) Bool

Read LLVM IR from a memory buffer and convert it into an in-memory Module object. Returns 0 on success. Optionally returns a human-readable description of any errors that occurred during parsing IR. OutMessage must be disposed with LLVMDisposeMessage. The memory buffer is not consumed by this function. It is the responsibility of the caller to free it with \c LLVMDisposeMemoryBuffer.

@see llvm::ParseIR()

llgo:link (*OpaqueContext).ParseIRInContext2 C.LLVMParseIRInContext2

func (*OpaqueContext) PointerTypeInContext

func (self *OpaqueContext) PointerTypeInContext(AddressSpace c.Uint) TypeRef

Create an opaque pointer type in a context.

@see llvm::PointerType::get()

llgo:link (*OpaqueContext).PointerTypeInContext C.LLVMPointerTypeInContext

func (*OpaqueContext) StructCreateNamed

func (self *OpaqueContext) StructCreateNamed(Name *c.Char) TypeRef

Create an empty structure in a context having a specified name.

@see llvm::StructType::create()

llgo:link (*OpaqueContext).StructCreateNamed C.LLVMStructCreateNamed

func (*OpaqueContext) StructTypeInContext

func (self *OpaqueContext) StructTypeInContext(ElementTypes *TypeRef, ElementCount c.Uint, Packed Bool) TypeRef

Create a new structure type in a context.

A structure is specified by a list of inner elements/types and whether these can be packed together.

@see llvm::StructType::create()

llgo:link (*OpaqueContext).StructTypeInContext C.LLVMStructTypeInContext

func (*OpaqueContext) SyncScopeID

func (self *OpaqueContext) SyncScopeID(Name *c.Char, SLen c.SizeT) c.Uint

Maps a synchronization scope name to a ID unique within this context.

llgo:link (*OpaqueContext).SyncScopeID C.LLVMGetSyncScopeID

func (*OpaqueContext) TargetExtTypeInContext

func (self *OpaqueContext) TargetExtTypeInContext(Name *c.Char, TypeParams *TypeRef, TypeParamCount c.Uint, IntParams *c.Uint, IntParamCount c.Uint) TypeRef

Create a target extension type in LLVM context.

llgo:link (*OpaqueContext).TargetExtTypeInContext C.LLVMTargetExtTypeInContext

func (*OpaqueContext) TemporaryMDNode

func (self *OpaqueContext) TemporaryMDNode(Data *MetadataRef, NumElements c.SizeT) MetadataRef

Create a new temporary \c MDNode. Suitable for use in constructing cyclic \c MDNode structures. A temporary \c MDNode is not uniqued, may be RAUW'd, and must be manually deleted with \c LLVMDisposeTemporaryMDNode. \param Ctx The context in which to construct the temporary node. \param Data The metadata elements. \param NumElements Number of metadata elements.

llgo:link (*OpaqueContext).TemporaryMDNode C.LLVMTemporaryMDNode

func (*OpaqueContext) TokenTypeInContext

func (self *OpaqueContext) TokenTypeInContext() TypeRef

Create a token type in a context.

llgo:link (*OpaqueContext).TokenTypeInContext C.LLVMTokenTypeInContext

func (*OpaqueContext) TypeByName2

func (self *OpaqueContext) TypeByName2(Name *c.Char) TypeRef

Obtain a Type from a context by its registered name.

llgo:link (*OpaqueContext).TypeByName2 C.LLVMGetTypeByName2

func (*OpaqueContext) VoidTypeInContext

func (self *OpaqueContext) VoidTypeInContext() TypeRef

Create a void type in a context.

llgo:link (*OpaqueContext).VoidTypeInContext C.LLVMVoidTypeInContext

func (*OpaqueContext) X86AMXTypeInContext

func (self *OpaqueContext) X86AMXTypeInContext() TypeRef

Create a X86 AMX type in a context.

llgo:link (*OpaqueContext).X86AMXTypeInContext C.LLVMX86AMXTypeInContext

func (*OpaqueContext) X86FP80TypeInContext

func (self *OpaqueContext) X86FP80TypeInContext() TypeRef

Obtain a 80-bit floating point type (X87) from a context.

llgo:link (*OpaqueContext).X86FP80TypeInContext C.LLVMX86FP80TypeInContext

type OpaqueDIBuilder

type OpaqueDIBuilder struct {
}

func (*OpaqueDIBuilder) DIBuilderCreateArrayType

func (self *OpaqueDIBuilder) DIBuilderCreateArrayType(Size c.Uint64T, AlignInBits c.Uint32T, Ty MetadataRef, Subscripts *MetadataRef, NumSubscripts c.Uint) MetadataRef

Create debugging information entry for an array. \param Builder The DIBuilder. \param Size Array size. \param AlignInBits Alignment. \param Ty Element type. \param Subscripts Subscripts. \param NumSubscripts Number of subscripts.

llgo:link (*OpaqueDIBuilder).DIBuilderCreateArrayType C.LLVMDIBuilderCreateArrayType

func (*OpaqueDIBuilder) DIBuilderCreateArtificialType

func (self *OpaqueDIBuilder) DIBuilderCreateArtificialType(Type MetadataRef) MetadataRef

Create a uniqued DIType* clone with FlagArtificial set. \param Builder The DIBuilder. \param Type The underlying type.

llgo:link (*OpaqueDIBuilder).DIBuilderCreateArtificialType C.LLVMDIBuilderCreateArtificialType

func (*OpaqueDIBuilder) DIBuilderCreateAutoVariable

func (self *OpaqueDIBuilder) DIBuilderCreateAutoVariable(Scope MetadataRef, Name *c.Char, NameLen c.SizeT, File MetadataRef, LineNo c.Uint, Ty MetadataRef, AlwaysPreserve Bool, Flags DIFlags, AlignInBits c.Uint32T) MetadataRef

Create a new descriptor for a local auto variable. \param Builder The DIBuilder. \param Scope The local scope the variable is declared in. \param Name Variable name. \param NameLen Length of variable name. \param File File where this variable is defined. \param LineNo Line number. \param Ty Metadata describing the type of the variable. \param AlwaysPreserve If true, this descriptor will survive optimizations. \param Flags Flags. \param AlignInBits Variable alignment.

llgo:link (*OpaqueDIBuilder).DIBuilderCreateAutoVariable C.LLVMDIBuilderCreateAutoVariable

func (*OpaqueDIBuilder) DIBuilderCreateBasicType

func (self *OpaqueDIBuilder) DIBuilderCreateBasicType(Name *c.Char, NameLen c.SizeT, SizeInBits c.Uint64T, Encoding DWARFTypeEncoding, Flags DIFlags) MetadataRef

Create debugging information entry for a basic type. \param Builder The DIBuilder. \param Name Type name. \param NameLen Length of type name. \param SizeInBits Size of the type. \param Encoding DWARF encoding code, e.g. \c LLVMDWARFTypeEncoding_float. \param Flags Flags to encode optional attribute like endianity

llgo:link (*OpaqueDIBuilder).DIBuilderCreateBasicType C.LLVMDIBuilderCreateBasicType

func (*OpaqueDIBuilder) DIBuilderCreateBitFieldMemberType

func (self *OpaqueDIBuilder) DIBuilderCreateBitFieldMemberType(Scope MetadataRef, Name *c.Char, NameLen c.SizeT, File MetadataRef, LineNumber c.Uint, SizeInBits c.Uint64T, OffsetInBits c.Uint64T, StorageOffsetInBits c.Uint64T, Flags DIFlags, Type MetadataRef) MetadataRef

Create debugging information entry for a bit field member. \param Builder The DIBuilder. \param Scope Member scope. \param Name Member name. \param NameLen Length of member name. \param File File where this member is defined. \param LineNumber Line number. \param SizeInBits Member size. \param OffsetInBits Member offset. \param StorageOffsetInBits Member storage offset. \param Flags Flags to encode member attribute. \param Type Parent type.

llgo:link (*OpaqueDIBuilder).DIBuilderCreateBitFieldMemberType C.LLVMDIBuilderCreateBitFieldMemberType

func (*OpaqueDIBuilder) DIBuilderCreateClassType

func (self *OpaqueDIBuilder) DIBuilderCreateClassType(Scope MetadataRef, Name *c.Char, NameLen c.SizeT, File MetadataRef, LineNumber c.Uint, SizeInBits c.Uint64T, AlignInBits c.Uint32T, OffsetInBits c.Uint64T, Flags DIFlags, DerivedFrom MetadataRef, Elements *MetadataRef, NumElements c.Uint, VTableHolder MetadataRef, TemplateParamsNode MetadataRef, UniqueIdentifier *c.Char, UniqueIdentifierLen c.SizeT) MetadataRef

Create debugging information entry for a class. \param Scope Scope in which this class is defined. \param Name Class name. \param NameLen The length of the C string passed to \c Name. \param File File where this member is defined. \param LineNumber Line number. \param SizeInBits Member size. \param AlignInBits Member alignment. \param OffsetInBits Member offset. \param Flags Flags to encode member attribute, e.g. private. \param DerivedFrom Debug info of the base class of this type. \param Elements Class members. \param NumElements Number of class elements. \param VTableHolder Debug info of the base class that contains vtable

for this type. This is used in
DW_AT_containing_type. See DWARF documentation
for more info.

\param TemplateParamsNode Template type parameters. \param UniqueIdentifier A unique identifier for the type. \param UniqueIdentifierLen Length of the unique identifier.

llgo:link (*OpaqueDIBuilder).DIBuilderCreateClassType C.LLVMDIBuilderCreateClassType

func (*OpaqueDIBuilder) DIBuilderCreateCompileUnit

func (self *OpaqueDIBuilder) DIBuilderCreateCompileUnit(Lang DWARFSourceLanguage, FileRef MetadataRef, Producer *c.Char, ProducerLen c.SizeT, isOptimized Bool, Flags *c.Char, FlagsLen c.SizeT, RuntimeVer c.Uint, SplitName *c.Char, SplitNameLen c.SizeT, Kind DWARFEmissionKind, DWOId c.Uint, SplitDebugInlining Bool, DebugInfoForProfiling Bool, SysRoot *c.Char, SysRootLen c.SizeT, SDK *c.Char, SDKLen c.SizeT) MetadataRef

A CompileUnit provides an anchor for all debugging information generated during this instance of compilation. \param Lang Source programming language, eg.

\c LLVMDWARFSourceLanguageC99

\param FileRef File info. \param Producer Identify the producer of debugging information

and code.  Usually this is a compiler
version string.

\param ProducerLen The length of the C string passed to \c Producer. \param isOptimized A boolean flag which indicates whether optimization

is enabled or not.

\param Flags This string lists command line options. This

string is directly embedded in debug info
output which may be used by a tool
analyzing generated debugging information.

\param FlagsLen The length of the C string passed to \c Flags. \param RuntimeVer This indicates runtime version for languages like

Objective-C.

\param SplitName The name of the file that we'll split debug info

out into.

\param SplitNameLen The length of the C string passed to \c SplitName. \param Kind The kind of debug information to generate. \param DWOId The DWOId if this is a split skeleton compile unit. \param SplitDebugInlining Whether to emit inline debug info. \param DebugInfoForProfiling Whether to emit extra debug info for

profile collection.

\param SysRoot The Clang system root (value of -isysroot). \param SysRootLen The length of the C string passed to \c SysRoot. \param SDK The SDK. On Darwin, the last component of the sysroot. \param SDKLen The length of the C string passed to \c SDK.

llgo:link (*OpaqueDIBuilder).DIBuilderCreateCompileUnit C.LLVMDIBuilderCreateCompileUnit

func (*OpaqueDIBuilder) DIBuilderCreateConstantValueExpression

func (self *OpaqueDIBuilder) DIBuilderCreateConstantValueExpression(Value c.Uint64T) MetadataRef

Create a new descriptor for the specified variable that does not have an address, but does have a constant value. \param Builder The DIBuilder. \param Value The constant value.

llgo:link (*OpaqueDIBuilder).DIBuilderCreateConstantValueExpression C.LLVMDIBuilderCreateConstantValueExpression

func (*OpaqueDIBuilder) DIBuilderCreateDynamicArrayType

func (self *OpaqueDIBuilder) DIBuilderCreateDynamicArrayType(Scope MetadataRef, Name *c.Char, NameLen c.SizeT, LineNo c.Uint, File MetadataRef, Size c.Uint64T, AlignInBits c.Uint32T, Ty MetadataRef, Subscripts *MetadataRef, NumSubscripts c.Uint, DataLocation MetadataRef, Associated MetadataRef, Allocated MetadataRef, Rank MetadataRef, BitStride MetadataRef) MetadataRef

Create debugging information entry for a dynamic array. \param Builder The DIBuilder. \param Size Array size. \param AlignInBits Alignment. \param Ty Element type. \param Subscripts Subscripts. \param NumSubscripts Number of subscripts. \param DataLocation DataLocation. (DIVariable, DIExpression or NULL) \param Associated Associated. (DIVariable, DIExpression or NULL) \param Allocated Allocated. (DIVariable, DIExpression or NULL) \param Rank Rank. (DIVariable, DIExpression or NULL) \param BitStride BitStride.

llgo:link (*OpaqueDIBuilder).DIBuilderCreateDynamicArrayType C.LLVMDIBuilderCreateDynamicArrayType

func (*OpaqueDIBuilder) DIBuilderCreateEnumerationType

func (self *OpaqueDIBuilder) DIBuilderCreateEnumerationType(Scope MetadataRef, Name *c.Char, NameLen c.SizeT, File MetadataRef, LineNumber c.Uint, SizeInBits c.Uint64T, AlignInBits c.Uint32T, Elements *MetadataRef, NumElements c.Uint, ClassTy MetadataRef) MetadataRef

Create debugging information entry for an enumeration. \param Builder The DIBuilder. \param Scope Scope in which this enumeration is defined. \param Name Enumeration name. \param NameLen Length of enumeration name. \param File File where this member is defined. \param LineNumber Line number. \param SizeInBits Member size. \param AlignInBits Member alignment. \param Elements Enumeration elements. \param NumElements Number of enumeration elements. \param ClassTy Underlying type of a C++11/ObjC fixed enum.

llgo:link (*OpaqueDIBuilder).DIBuilderCreateEnumerationType C.LLVMDIBuilderCreateEnumerationType

func (*OpaqueDIBuilder) DIBuilderCreateEnumerator

func (self *OpaqueDIBuilder) DIBuilderCreateEnumerator(Name *c.Char, NameLen c.SizeT, Value c.Int64T, IsUnsigned Bool) MetadataRef

Create debugging information entry for an enumerator. @param Builder The DIBuilder. @param Name Enumerator name. @param NameLen Length of enumerator name. @param Value Enumerator value. @param IsUnsigned True if the value is unsigned.

llgo:link (*OpaqueDIBuilder).DIBuilderCreateEnumerator C.LLVMDIBuilderCreateEnumerator

func (*OpaqueDIBuilder) DIBuilderCreateEnumeratorOfArbitraryPrecision

func (self *OpaqueDIBuilder) DIBuilderCreateEnumeratorOfArbitraryPrecision(Name *c.Char, NameLen c.SizeT, SizeInBits c.Uint64T, Words *c.Uint64T, IsUnsigned Bool) MetadataRef

Create debugging information entry for an enumerator of arbitrary precision. @param Builder The DIBuilder. @param Name Enumerator name. @param NameLen Length of enumerator name. @param SizeInBits Number of bits of the value. @param Words The words that make up the value. @param IsUnsigned True if the value is unsigned.

llgo:link (*OpaqueDIBuilder).DIBuilderCreateEnumeratorOfArbitraryPrecision C.LLVMDIBuilderCreateEnumeratorOfArbitraryPrecision

func (*OpaqueDIBuilder) DIBuilderCreateExpression

func (self *OpaqueDIBuilder) DIBuilderCreateExpression(Addr *c.Uint64T, Length c.SizeT) MetadataRef

Create a new descriptor for the specified variable which has a complex address expression for its address. \param Builder The DIBuilder. \param Addr An array of complex address operations. \param Length Length of the address operation array.

llgo:link (*OpaqueDIBuilder).DIBuilderCreateExpression C.LLVMDIBuilderCreateExpression

func (*OpaqueDIBuilder) DIBuilderCreateFile

func (self *OpaqueDIBuilder) DIBuilderCreateFile(Filename *c.Char, FilenameLen c.SizeT, Directory *c.Char, DirectoryLen c.SizeT) MetadataRef

Create a file descriptor to hold debugging information for a file. \param Builder The \c DIBuilder. \param Filename File name. \param FilenameLen The length of the C string passed to \c Filename. \param Directory Directory. \param DirectoryLen The length of the C string passed to \c Directory.

llgo:link (*OpaqueDIBuilder).DIBuilderCreateFile C.LLVMDIBuilderCreateFile

func (*OpaqueDIBuilder) DIBuilderCreateFileWithChecksum

func (self *OpaqueDIBuilder) DIBuilderCreateFileWithChecksum(Filename *c.Char, FilenameLen c.SizeT, Directory *c.Char, DirectoryLen c.SizeT, ChecksumKind ChecksumKind, Checksum *c.Char, ChecksumLen c.SizeT, Source *c.Char, SourceLen c.SizeT) MetadataRef

Create a file descriptor to hold debugging information for a file. \param Builder The \c DIBuilder. \param Filename File name. \param FilenameLen The length of the C string passed to \c Filename. \param Directory Directory. \param DirectoryLen The length of the C string passed to \c Directory. \param ChecksumKind The kind of checksum. eg MD5, SHA256 \param Checksum The checksum. \param ChecksumLen The length of the checksum. \param Souce The embedded source. \param SourceLen The length of the source.

llgo:link (*OpaqueDIBuilder).DIBuilderCreateFileWithChecksum C.LLVMDIBuilderCreateFileWithChecksum

func (*OpaqueDIBuilder) DIBuilderCreateForwardDecl

func (self *OpaqueDIBuilder) DIBuilderCreateForwardDecl(Tag c.Uint, Name *c.Char, NameLen c.SizeT, Scope MetadataRef, File MetadataRef, Line c.Uint, RuntimeLang c.Uint, SizeInBits c.Uint64T, AlignInBits c.Uint32T, UniqueIdentifier *c.Char, UniqueIdentifierLen c.SizeT) MetadataRef

Create a permanent forward-declared type. \param Builder The DIBuilder. \param Tag A unique tag for this type. \param Name Type name. \param NameLen Length of type name. \param Scope Type scope. \param File File where this type is defined. \param Line Line number where this type is defined. \param RuntimeLang Indicates runtime version for languages like

Objective-C.

\param SizeInBits Member size. \param AlignInBits Member alignment. \param UniqueIdentifier A unique identifier for the type. \param UniqueIdentifierLen Length of the unique identifier.

llgo:link (*OpaqueDIBuilder).DIBuilderCreateForwardDecl C.LLVMDIBuilderCreateForwardDecl

func (*OpaqueDIBuilder) DIBuilderCreateFunction

func (self *OpaqueDIBuilder) DIBuilderCreateFunction(Scope MetadataRef, Name *c.Char, NameLen c.SizeT, LinkageName *c.Char, LinkageNameLen c.SizeT, File MetadataRef, LineNo c.Uint, Ty MetadataRef, IsLocalToUnit Bool, IsDefinition Bool, ScopeLine c.Uint, Flags DIFlags, IsOptimized Bool) MetadataRef

Create a new descriptor for the specified subprogram. \param Builder The \c DIBuilder. \param Scope Function scope. \param Name Function name. \param NameLen Length of enumeration name. \param LinkageName Mangled function name. \param LinkageNameLen Length of linkage name. \param File File where this variable is defined. \param LineNo Line number. \param Ty Function type. \param IsLocalToUnit True if this function is not externally visible. \param IsDefinition True if this is a function definition. \param ScopeLine Set to the beginning of the scope this starts \param Flags E.g.: \c LLVMDIFlagLValueReference. These flags are

used to emit dwarf attributes.

\param IsOptimized True if optimization is ON.

llgo:link (*OpaqueDIBuilder).DIBuilderCreateFunction C.LLVMDIBuilderCreateFunction

func (*OpaqueDIBuilder) DIBuilderCreateGlobalVariableExpression

func (self *OpaqueDIBuilder) DIBuilderCreateGlobalVariableExpression(Scope MetadataRef, Name *c.Char, NameLen c.SizeT, Linkage *c.Char, LinkLen c.SizeT, File MetadataRef, LineNo c.Uint, Ty MetadataRef, LocalToUnit Bool, Expr MetadataRef, Decl MetadataRef, AlignInBits c.Uint32T) MetadataRef

Create a new descriptor for the specified variable. \param Scope Variable scope. \param Name Name of the variable. \param NameLen The length of the C string passed to \c Name. \param Linkage Mangled name of the variable. \param LinkLen The length of the C string passed to \c Linkage. \param File File where this variable is defined. \param LineNo Line number. \param Ty Variable Type. \param LocalToUnit Boolean flag indicate whether this variable is

externally visible or not.

\param Expr The location of the global relative to the attached

GlobalVariable.

\param Decl Reference to the corresponding declaration.

variables.

\param AlignInBits Variable alignment(or 0 if no alignment attr was

specified)

llgo:link (*OpaqueDIBuilder).DIBuilderCreateGlobalVariableExpression C.LLVMDIBuilderCreateGlobalVariableExpression

func (*OpaqueDIBuilder) DIBuilderCreateImportedDeclaration

func (self *OpaqueDIBuilder) DIBuilderCreateImportedDeclaration(Scope MetadataRef, Decl MetadataRef, File MetadataRef, Line c.Uint, Name *c.Char, NameLen c.SizeT, Elements *MetadataRef, NumElements c.Uint) MetadataRef

Create a descriptor for an imported function, type, or variable. Suitable for e.g. FORTRAN-style USE declarations. \param Builder The DIBuilder. \param Scope The scope this module is imported into. \param Decl The declaration (or definition) of a function, type, or variable. \param File File where the declaration is located. \param Line Line number of the declaration. \param Name A name that uniquely identifies this imported declaration. \param NameLen The length of the C string passed to \c Name. \param Elements Renamed elements. \param NumElements Number of renamed elements.

llgo:link (*OpaqueDIBuilder).DIBuilderCreateImportedDeclaration C.LLVMDIBuilderCreateImportedDeclaration

func (*OpaqueDIBuilder) DIBuilderCreateImportedModuleFromAlias

func (self *OpaqueDIBuilder) DIBuilderCreateImportedModuleFromAlias(Scope MetadataRef, ImportedEntity MetadataRef, File MetadataRef, Line c.Uint, Elements *MetadataRef, NumElements c.Uint) MetadataRef

Create a descriptor for an imported module that aliases another imported entity descriptor. \param Builder The \c DIBuilder. \param Scope The scope this module is imported into \param ImportedEntity Previous imported entity to alias. \param File File where the declaration is located. \param Line Line number of the declaration. \param Elements Renamed elements. \param NumElements Number of renamed elements.

llgo:link (*OpaqueDIBuilder).DIBuilderCreateImportedModuleFromAlias C.LLVMDIBuilderCreateImportedModuleFromAlias

func (*OpaqueDIBuilder) DIBuilderCreateImportedModuleFromModule

func (self *OpaqueDIBuilder) DIBuilderCreateImportedModuleFromModule(Scope MetadataRef, M MetadataRef, File MetadataRef, Line c.Uint, Elements *MetadataRef, NumElements c.Uint) MetadataRef

Create a descriptor for an imported module. \param Builder The \c DIBuilder. \param Scope The scope this module is imported into \param M The module being imported here \param File File where the declaration is located. \param Line Line number of the declaration. \param Elements Renamed elements. \param NumElements Number of renamed elements.

llgo:link (*OpaqueDIBuilder).DIBuilderCreateImportedModuleFromModule C.LLVMDIBuilderCreateImportedModuleFromModule

func (*OpaqueDIBuilder) DIBuilderCreateImportedModuleFromNamespace

func (self *OpaqueDIBuilder) DIBuilderCreateImportedModuleFromNamespace(Scope MetadataRef, NS MetadataRef, File MetadataRef, Line c.Uint) MetadataRef

Create a descriptor for an imported namespace. Suitable for e.g. C++ using declarations. \param Builder The \c DIBuilder. \param Scope The scope this module is imported into \param File File where the declaration is located. \param Line Line number of the declaration.

llgo:link (*OpaqueDIBuilder).DIBuilderCreateImportedModuleFromNamespace C.LLVMDIBuilderCreateImportedModuleFromNamespace

func (*OpaqueDIBuilder) DIBuilderCreateInheritance

func (self *OpaqueDIBuilder) DIBuilderCreateInheritance(Ty MetadataRef, BaseTy MetadataRef, BaseOffset c.Uint64T, VBPtrOffset c.Uint32T, Flags DIFlags) MetadataRef

Create debugging information entry to establish inheritance relationship between two types. \param Builder The DIBuilder. \param Ty Original type. \param BaseTy Base type. Ty is inherits from base. \param BaseOffset Base offset. \param VBPtrOffset Virtual base pointer offset. \param Flags Flags to describe inheritance attribute, e.g. private

llgo:link (*OpaqueDIBuilder).DIBuilderCreateInheritance C.LLVMDIBuilderCreateInheritance

func (*OpaqueDIBuilder) DIBuilderCreateLabel

func (self *OpaqueDIBuilder) DIBuilderCreateLabel(Context MetadataRef, Name *c.Char, NameLen c.SizeT, File MetadataRef, LineNo c.Uint, AlwaysPreserve Bool) MetadataRef

Create a new descriptor for a label

\param Builder The DIBuilder. \param Scope The scope to create the label in. \param Name Variable name. \param NameLen Length of variable name. \param File The file to create the label in. \param LineNo Line Number. \param AlwaysPreserve Preserve the label regardless of optimization.

@see llvm::DIBuilder::createLabel()

llgo:link (*OpaqueDIBuilder).DIBuilderCreateLabel C.LLVMDIBuilderCreateLabel

func (*OpaqueDIBuilder) DIBuilderCreateLexicalBlock

func (self *OpaqueDIBuilder) DIBuilderCreateLexicalBlock(Scope MetadataRef, File MetadataRef, Line c.Uint, Column c.Uint) MetadataRef

Create a descriptor for a lexical block with the specified parent context. \param Builder The \c DIBuilder. \param Scope Parent lexical block. \param File Source file. \param Line The line in the source file. \param Column The column in the source file.

llgo:link (*OpaqueDIBuilder).DIBuilderCreateLexicalBlock C.LLVMDIBuilderCreateLexicalBlock

func (*OpaqueDIBuilder) DIBuilderCreateLexicalBlockFile

func (self *OpaqueDIBuilder) DIBuilderCreateLexicalBlockFile(Scope MetadataRef, File MetadataRef, Discriminator c.Uint) MetadataRef

Create a descriptor for a lexical block with a new file attached. \param Builder The \c DIBuilder. \param Scope Lexical block. \param File Source file. \param Discriminator DWARF path discriminator value.

llgo:link (*OpaqueDIBuilder).DIBuilderCreateLexicalBlockFile C.LLVMDIBuilderCreateLexicalBlockFile

func (*OpaqueDIBuilder) DIBuilderCreateMacro

func (self *OpaqueDIBuilder) DIBuilderCreateMacro(ParentMacroFile MetadataRef, Line c.Uint, RecordType DWARFMacinfoRecordType, Name *c.Char, NameLen c.SizeT, Value *c.Char, ValueLen c.SizeT) MetadataRef

Create debugging information entry for a macro. @param Builder The DIBuilder. @param ParentMacroFile Macro parent (could be NULL). @param Line Source line number where the macro is defined. @param RecordType DW_MACINFO_define or DW_MACINFO_undef. @param Name Macro name. @param NameLen Macro name length. @param Value Macro value. @param ValueLen Macro value length.

llgo:link (*OpaqueDIBuilder).DIBuilderCreateMacro C.LLVMDIBuilderCreateMacro

func (*OpaqueDIBuilder) DIBuilderCreateMemberPointerType

func (self *OpaqueDIBuilder) DIBuilderCreateMemberPointerType(PointeeType MetadataRef, ClassType MetadataRef, SizeInBits c.Uint64T, AlignInBits c.Uint32T, Flags DIFlags) MetadataRef

Create debugging information entry for a pointer to member. \param Builder The DIBuilder. \param PointeeType Type pointed to by this pointer. \param ClassType Type for which this pointer points to members of. \param SizeInBits Size. \param AlignInBits Alignment. \param Flags Flags.

llgo:link (*OpaqueDIBuilder).DIBuilderCreateMemberPointerType C.LLVMDIBuilderCreateMemberPointerType

func (*OpaqueDIBuilder) DIBuilderCreateMemberType

func (self *OpaqueDIBuilder) DIBuilderCreateMemberType(Scope MetadataRef, Name *c.Char, NameLen c.SizeT, File MetadataRef, LineNo c.Uint, SizeInBits c.Uint64T, AlignInBits c.Uint32T, OffsetInBits c.Uint64T, Flags DIFlags, Ty MetadataRef) MetadataRef

Create debugging information entry for a member. \param Builder The DIBuilder. \param Scope Member scope. \param Name Member name. \param NameLen Length of member name. \param File File where this member is defined. \param LineNo Line number. \param SizeInBits Member size. \param AlignInBits Member alignment. \param OffsetInBits Member offset. \param Flags Flags to encode member attribute, e.g. private \param Ty Parent type.

llgo:link (*OpaqueDIBuilder).DIBuilderCreateMemberType C.LLVMDIBuilderCreateMemberType

func (*OpaqueDIBuilder) DIBuilderCreateModule

func (self *OpaqueDIBuilder) DIBuilderCreateModule(ParentScope MetadataRef, Name *c.Char, NameLen c.SizeT, ConfigMacros *c.Char, ConfigMacrosLen c.SizeT, IncludePath *c.Char, IncludePathLen c.SizeT, APINotesFile *c.Char, APINotesFileLen c.SizeT) MetadataRef

Creates a new descriptor for a module with the specified parent scope. \param Builder The \c DIBuilder. \param ParentScope The parent scope containing this module declaration. \param Name Module name. \param NameLen The length of the C string passed to \c Name. \param ConfigMacros A space-separated shell-quoted list of -D macro definitions as they would appear on a command line. \param ConfigMacrosLen The length of the C string passed to \c ConfigMacros. \param IncludePath The path to the module map file. \param IncludePathLen The length of the C string passed to \c IncludePath. \param APINotesFile The path to an API notes file for the module. \param APINotesFileLen The length of the C string passed to \c APINotestFile.

llgo:link (*OpaqueDIBuilder).DIBuilderCreateModule C.LLVMDIBuilderCreateModule

func (*OpaqueDIBuilder) DIBuilderCreateNameSpace

func (self *OpaqueDIBuilder) DIBuilderCreateNameSpace(ParentScope MetadataRef, Name *c.Char, NameLen c.SizeT, ExportSymbols Bool) MetadataRef

Creates a new descriptor for a namespace with the specified parent scope. \param Builder The \c DIBuilder. \param ParentScope The parent scope containing this module declaration. \param Name NameSpace name. \param NameLen The length of the C string passed to \c Name. \param ExportSymbols Whether or not the namespace exports symbols, e.g.

this is true of C++ inline namespaces.

llgo:link (*OpaqueDIBuilder).DIBuilderCreateNameSpace C.LLVMDIBuilderCreateNameSpace

func (*OpaqueDIBuilder) DIBuilderCreateNullPtrType

func (self *OpaqueDIBuilder) DIBuilderCreateNullPtrType() MetadataRef

Create C++11 nullptr type. \param Builder The DIBuilder.

llgo:link (*OpaqueDIBuilder).DIBuilderCreateNullPtrType C.LLVMDIBuilderCreateNullPtrType

func (*OpaqueDIBuilder) DIBuilderCreateObjCIVar

func (self *OpaqueDIBuilder) DIBuilderCreateObjCIVar(Name *c.Char, NameLen c.SizeT, File MetadataRef, LineNo c.Uint, SizeInBits c.Uint64T, AlignInBits c.Uint32T, OffsetInBits c.Uint64T, Flags DIFlags, Ty MetadataRef, PropertyNode MetadataRef) MetadataRef

Create debugging information entry for Objective-C instance variable. \param Builder The DIBuilder. \param Name Member name. \param NameLen The length of the C string passed to \c Name. \param File File where this member is defined. \param LineNo Line number. \param SizeInBits Member size. \param AlignInBits Member alignment. \param OffsetInBits Member offset. \param Flags Flags to encode member attribute, e.g. private \param Ty Parent type. \param PropertyNode Property associated with this ivar.

llgo:link (*OpaqueDIBuilder).DIBuilderCreateObjCIVar C.LLVMDIBuilderCreateObjCIVar

func (*OpaqueDIBuilder) DIBuilderCreateObjCProperty

func (self *OpaqueDIBuilder) DIBuilderCreateObjCProperty(Name *c.Char, NameLen c.SizeT, File MetadataRef, LineNo c.Uint, GetterName *c.Char, GetterNameLen c.SizeT, SetterName *c.Char, SetterNameLen c.SizeT, PropertyAttributes c.Uint, Ty MetadataRef) MetadataRef

Create debugging information entry for Objective-C property. \param Builder The DIBuilder. \param Name Property name. \param NameLen The length of the C string passed to \c Name. \param File File where this property is defined. \param LineNo Line number. \param GetterName Name of the Objective C property getter selector. \param GetterNameLen The length of the C string passed to \c GetterName. \param SetterName Name of the Objective C property setter selector. \param SetterNameLen The length of the C string passed to \c SetterName. \param PropertyAttributes Objective C property attributes. \param Ty Type.

llgo:link (*OpaqueDIBuilder).DIBuilderCreateObjCProperty C.LLVMDIBuilderCreateObjCProperty

func (*OpaqueDIBuilder) DIBuilderCreateObjectPointerType

func (self *OpaqueDIBuilder) DIBuilderCreateObjectPointerType(Type MetadataRef, Implicit Bool) MetadataRef

Create a uniqued DIType* clone with FlagObjectPointer. If \c Implicit is true, then also set FlagArtificial. \param Builder The DIBuilder. \param Type The underlying type to which this pointer points. \param Implicit Indicates whether this pointer was implicitly generated

(i.e., not spelled out in source).

llgo:link (*OpaqueDIBuilder).DIBuilderCreateObjectPointerType C.LLVMDIBuilderCreateObjectPointerType

func (*OpaqueDIBuilder) DIBuilderCreateParameterVariable

func (self *OpaqueDIBuilder) DIBuilderCreateParameterVariable(Scope MetadataRef, Name *c.Char, NameLen c.SizeT, ArgNo c.Uint, File MetadataRef, LineNo c.Uint, Ty MetadataRef, AlwaysPreserve Bool, Flags DIFlags) MetadataRef

Create a new descriptor for a function parameter variable. \param Builder The DIBuilder. \param Scope The local scope the variable is declared in. \param Name Variable name. \param NameLen Length of variable name. \param ArgNo Unique argument number for this variable; starts at 1. \param File File where this variable is defined. \param LineNo Line number. \param Ty Metadata describing the type of the variable. \param AlwaysPreserve If true, this descriptor will survive optimizations. \param Flags Flags.

llgo:link (*OpaqueDIBuilder).DIBuilderCreateParameterVariable C.LLVMDIBuilderCreateParameterVariable

func (*OpaqueDIBuilder) DIBuilderCreatePointerType

func (self *OpaqueDIBuilder) DIBuilderCreatePointerType(PointeeTy MetadataRef, SizeInBits c.Uint64T, AlignInBits c.Uint32T, AddressSpace c.Uint, Name *c.Char, NameLen c.SizeT) MetadataRef

Create debugging information entry for a pointer. \param Builder The DIBuilder. \param PointeeTy Type pointed by this pointer. \param SizeInBits Size. \param AlignInBits Alignment. (optional, pass 0 to ignore) \param AddressSpace DWARF address space. (optional, pass 0 to ignore) \param Name Pointer type name. (optional) \param NameLen Length of pointer type name. (optional)

llgo:link (*OpaqueDIBuilder).DIBuilderCreatePointerType C.LLVMDIBuilderCreatePointerType

func (*OpaqueDIBuilder) DIBuilderCreateQualifiedType

func (self *OpaqueDIBuilder) DIBuilderCreateQualifiedType(Tag c.Uint, Type MetadataRef) MetadataRef

Create debugging information entry for a qualified type, e.g. 'const int'. \param Builder The DIBuilder. \param Tag Tag identifying type,

e.g. LLVMDWARFTypeQualifier_volatile_type

\param Type Base Type.

llgo:link (*OpaqueDIBuilder).DIBuilderCreateQualifiedType C.LLVMDIBuilderCreateQualifiedType

func (*OpaqueDIBuilder) DIBuilderCreateReferenceType

func (self *OpaqueDIBuilder) DIBuilderCreateReferenceType(Tag c.Uint, Type MetadataRef) MetadataRef

Create debugging information entry for a c++ style reference or rvalue reference type. \param Builder The DIBuilder. \param Tag Tag identifying type, \param Type Base Type.

llgo:link (*OpaqueDIBuilder).DIBuilderCreateReferenceType C.LLVMDIBuilderCreateReferenceType

func (*OpaqueDIBuilder) DIBuilderCreateReplaceableCompositeType

func (self *OpaqueDIBuilder) DIBuilderCreateReplaceableCompositeType(Tag c.Uint, Name *c.Char, NameLen c.SizeT, Scope MetadataRef, File MetadataRef, Line c.Uint, RuntimeLang c.Uint, SizeInBits c.Uint64T, AlignInBits c.Uint32T, Flags DIFlags, UniqueIdentifier *c.Char, UniqueIdentifierLen c.SizeT) MetadataRef

Create a temporary forward-declared type. \param Builder The DIBuilder. \param Tag A unique tag for this type. \param Name Type name. \param NameLen Length of type name. \param Scope Type scope. \param File File where this type is defined. \param Line Line number where this type is defined. \param RuntimeLang Indicates runtime version for languages like

Objective-C.

\param SizeInBits Member size. \param AlignInBits Member alignment. \param Flags Flags. \param UniqueIdentifier A unique identifier for the type. \param UniqueIdentifierLen Length of the unique identifier.

llgo:link (*OpaqueDIBuilder).DIBuilderCreateReplaceableCompositeType C.LLVMDIBuilderCreateReplaceableCompositeType

func (*OpaqueDIBuilder) DIBuilderCreateSetType

func (self *OpaqueDIBuilder) DIBuilderCreateSetType(Scope MetadataRef, Name *c.Char, NameLen c.SizeT, File MetadataRef, LineNumber c.Uint, SizeInBits c.Uint64T, AlignInBits c.Uint32T, BaseTy MetadataRef) MetadataRef

Create debugging information entry for a set. \param Builder The DIBuilder. \param Scope The scope in which the set is defined. \param Name A name that uniquely identifies this set. \param NameLen The length of the C string passed to \c Name. \param File File where the set is located. \param Line Line number of the declaration. \param SizeInBits Set size. \param AlignInBits Set alignment. \param BaseTy The base type of the set.

llgo:link (*OpaqueDIBuilder).DIBuilderCreateSetType C.LLVMDIBuilderCreateSetType

func (*OpaqueDIBuilder) DIBuilderCreateStaticMemberType

func (self *OpaqueDIBuilder) DIBuilderCreateStaticMemberType(Scope MetadataRef, Name *c.Char, NameLen c.SizeT, File MetadataRef, LineNumber c.Uint, Type MetadataRef, Flags DIFlags, ConstantVal ValueRef, AlignInBits c.Uint32T) MetadataRef

Create debugging information entry for a C++ static data member. \param Builder The DIBuilder. \param Scope Member scope. \param Name Member name. \param NameLen Length of member name. \param File File where this member is declared. \param LineNumber Line number. \param Type Type of the static member. \param Flags Flags to encode member attribute, e.g. private. \param ConstantVal Const initializer of the member. \param AlignInBits Member alignment.

llgo:link (*OpaqueDIBuilder).DIBuilderCreateStaticMemberType C.LLVMDIBuilderCreateStaticMemberType

func (*OpaqueDIBuilder) DIBuilderCreateStructType

func (self *OpaqueDIBuilder) DIBuilderCreateStructType(Scope MetadataRef, Name *c.Char, NameLen c.SizeT, File MetadataRef, LineNumber c.Uint, SizeInBits c.Uint64T, AlignInBits c.Uint32T, Flags DIFlags, DerivedFrom MetadataRef, Elements *MetadataRef, NumElements c.Uint, RunTimeLang c.Uint, VTableHolder MetadataRef, UniqueId *c.Char, UniqueIdLen c.SizeT) MetadataRef

Create debugging information entry for a struct. \param Builder The DIBuilder. \param Scope Scope in which this struct is defined. \param Name Struct name. \param NameLen Struct name length. \param File File where this member is defined. \param LineNumber Line number. \param SizeInBits Member size. \param AlignInBits Member alignment. \param Flags Flags to encode member attribute, e.g. private \param Elements Struct elements. \param NumElements Number of struct elements. \param RunTimeLang Optional parameter, Objective-C runtime version. \param VTableHolder The object containing the vtable for the struct. \param UniqueId A unique identifier for the struct. \param UniqueIdLen Length of the unique identifier for the struct.

llgo:link (*OpaqueDIBuilder).DIBuilderCreateStructType C.LLVMDIBuilderCreateStructType

func (*OpaqueDIBuilder) DIBuilderCreateSubrangeType

func (self *OpaqueDIBuilder) DIBuilderCreateSubrangeType(Scope MetadataRef, Name *c.Char, NameLen c.SizeT, LineNo c.Uint, File MetadataRef, SizeInBits c.Uint64T, AlignInBits c.Uint32T, Flags DIFlags, BaseTy MetadataRef, LowerBound MetadataRef, UpperBound MetadataRef, Stride MetadataRef, Bias MetadataRef) MetadataRef

Create a descriptor for a subrange with dynamic bounds. \param Builder The DIBuilder. \param Scope The scope in which the subrange is defined. \param Name A name that uniquely identifies this subrange. \param NameLen The length of the C string passed to \c Name. \param LineNo Line number. \param File File where the subrange is located. \param SizeInBits Member size. \param AlignInBits Member alignment. \param Flags Flags. \param BaseTy The base type of the subrange. eg integer or enumeration \param LowerBound Lower bound of the subrange. \param UpperBound Upper bound of the subrange. \param Stride Stride of the subrange. \param Bias Bias of the subrange.

llgo:link (*OpaqueDIBuilder).DIBuilderCreateSubrangeType C.LLVMDIBuilderCreateSubrangeType

func (*OpaqueDIBuilder) DIBuilderCreateSubroutineType

func (self *OpaqueDIBuilder) DIBuilderCreateSubroutineType(File MetadataRef, ParameterTypes *MetadataRef, NumParameterTypes c.Uint, Flags DIFlags) MetadataRef

Create subroutine type. \param Builder The DIBuilder. \param File The file in which the subroutine resides. \param ParameterTypes An array of subroutine parameter types. This

includes return type at 0th index.

\param NumParameterTypes The number of parameter types in \c ParameterTypes \param Flags E.g.: \c LLVMDIFlagLValueReference.

These flags are used to emit dwarf attributes.

llgo:link (*OpaqueDIBuilder).DIBuilderCreateSubroutineType C.LLVMDIBuilderCreateSubroutineType

func (*OpaqueDIBuilder) DIBuilderCreateTempGlobalVariableFwdDecl

func (self *OpaqueDIBuilder) DIBuilderCreateTempGlobalVariableFwdDecl(Scope MetadataRef, Name *c.Char, NameLen c.SizeT, Linkage *c.Char, LnkLen c.SizeT, File MetadataRef, LineNo c.Uint, Ty MetadataRef, LocalToUnit Bool, Decl MetadataRef, AlignInBits c.Uint32T) MetadataRef

Create a new descriptor for the specified global variable that is temporary and meant to be RAUWed. \param Scope Variable scope. \param Name Name of the variable. \param NameLen The length of the C string passed to \c Name. \param Linkage Mangled name of the variable. \param LnkLen The length of the C string passed to \c Linkage. \param File File where this variable is defined. \param LineNo Line number. \param Ty Variable Type. \param LocalToUnit Boolean flag indicate whether this variable is

externally visible or not.

\param Decl Reference to the corresponding declaration. \param AlignInBits Variable alignment(or 0 if no alignment attr was

specified)

llgo:link (*OpaqueDIBuilder).DIBuilderCreateTempGlobalVariableFwdDecl C.LLVMDIBuilderCreateTempGlobalVariableFwdDecl

func (*OpaqueDIBuilder) DIBuilderCreateTempMacroFile

func (self *OpaqueDIBuilder) DIBuilderCreateTempMacroFile(ParentMacroFile MetadataRef, Line c.Uint, File MetadataRef) MetadataRef

Create debugging information temporary entry for a macro file. List of macro node direct children will be calculated by DIBuilder, using the \p ParentMacroFile relationship. @param Builder The DIBuilder. @param ParentMacroFile Macro parent (could be NULL). @param Line Source line number where the macro file is included. @param File File descriptor containing the name of the macro file.

llgo:link (*OpaqueDIBuilder).DIBuilderCreateTempMacroFile C.LLVMDIBuilderCreateTempMacroFile

func (*OpaqueDIBuilder) DIBuilderCreateTypedef

func (self *OpaqueDIBuilder) DIBuilderCreateTypedef(Type MetadataRef, Name *c.Char, NameLen c.SizeT, File MetadataRef, LineNo c.Uint, Scope MetadataRef, AlignInBits c.Uint32T) MetadataRef

Create debugging information entry for a typedef. \param Builder The DIBuilder. \param Type Original type. \param Name Typedef name. \param File File where this type is defined. \param LineNo Line number. \param Scope The surrounding context for the typedef.

llgo:link (*OpaqueDIBuilder).DIBuilderCreateTypedef C.LLVMDIBuilderCreateTypedef

func (*OpaqueDIBuilder) DIBuilderCreateUnionType

func (self *OpaqueDIBuilder) DIBuilderCreateUnionType(Scope MetadataRef, Name *c.Char, NameLen c.SizeT, File MetadataRef, LineNumber c.Uint, SizeInBits c.Uint64T, AlignInBits c.Uint32T, Flags DIFlags, Elements *MetadataRef, NumElements c.Uint, RunTimeLang c.Uint, UniqueId *c.Char, UniqueIdLen c.SizeT) MetadataRef

Create debugging information entry for a union. \param Builder The DIBuilder. \param Scope Scope in which this union is defined. \param Name Union name. \param NameLen Length of union name. \param File File where this member is defined. \param LineNumber Line number. \param SizeInBits Member size. \param AlignInBits Member alignment. \param Flags Flags to encode member attribute, e.g. private \param Elements Union elements. \param NumElements Number of union elements. \param RunTimeLang Optional parameter, Objective-C runtime version. \param UniqueId A unique identifier for the union. \param UniqueIdLen Length of unique identifier.

llgo:link (*OpaqueDIBuilder).DIBuilderCreateUnionType C.LLVMDIBuilderCreateUnionType

func (*OpaqueDIBuilder) DIBuilderCreateUnspecifiedType

func (self *OpaqueDIBuilder) DIBuilderCreateUnspecifiedType(Name *c.Char, NameLen c.SizeT) MetadataRef

Create a DWARF unspecified type. \param Builder The DIBuilder. \param Name The unspecified type's name. \param NameLen Length of type name.

llgo:link (*OpaqueDIBuilder).DIBuilderCreateUnspecifiedType C.LLVMDIBuilderCreateUnspecifiedType

func (*OpaqueDIBuilder) DIBuilderCreateVectorType

func (self *OpaqueDIBuilder) DIBuilderCreateVectorType(Size c.Uint64T, AlignInBits c.Uint32T, Ty MetadataRef, Subscripts *MetadataRef, NumSubscripts c.Uint) MetadataRef

Create debugging information entry for a vector type. \param Builder The DIBuilder. \param Size Vector size. \param AlignInBits Alignment. \param Ty Element type. \param Subscripts Subscripts. \param NumSubscripts Number of subscripts.

llgo:link (*OpaqueDIBuilder).DIBuilderCreateVectorType C.LLVMDIBuilderCreateVectorType

func (*OpaqueDIBuilder) DIBuilderFinalize

func (self *OpaqueDIBuilder) DIBuilderFinalize()

Construct any deferred debug info descriptors.

llgo:link (*OpaqueDIBuilder).DIBuilderFinalize C.LLVMDIBuilderFinalize

func (*OpaqueDIBuilder) DIBuilderFinalizeSubprogram

func (self *OpaqueDIBuilder) DIBuilderFinalizeSubprogram(Subprogram MetadataRef)

Finalize a specific subprogram. No new variables may be added to this subprogram afterwards.

llgo:link (*OpaqueDIBuilder).DIBuilderFinalizeSubprogram C.LLVMDIBuilderFinalizeSubprogram

func (*OpaqueDIBuilder) DIBuilderGetOrCreateArray

func (self *OpaqueDIBuilder) DIBuilderGetOrCreateArray(Data *MetadataRef, NumElements c.SizeT) MetadataRef

Create an array of DI Nodes. \param Builder The DIBuilder. \param Data The DI Node elements. \param NumElements Number of DI Node elements.

llgo:link (*OpaqueDIBuilder).DIBuilderGetOrCreateArray C.LLVMDIBuilderGetOrCreateArray

func (*OpaqueDIBuilder) DIBuilderGetOrCreateSubrange

func (self *OpaqueDIBuilder) DIBuilderGetOrCreateSubrange(LowerBound c.Int64T, Count c.Int64T) MetadataRef

Create a descriptor for a value range. \param Builder The DIBuilder. \param LowerBound Lower bound of the subrange, e.g. 0 for C, 1 for Fortran. \param Count Count of elements in the subrange.

llgo:link (*OpaqueDIBuilder).DIBuilderGetOrCreateSubrange C.LLVMDIBuilderGetOrCreateSubrange

func (*OpaqueDIBuilder) DIBuilderGetOrCreateTypeArray

func (self *OpaqueDIBuilder) DIBuilderGetOrCreateTypeArray(Data *MetadataRef, NumElements c.SizeT) MetadataRef

Create a type array. \param Builder The DIBuilder. \param Data The type elements. \param NumElements Number of type elements.

llgo:link (*OpaqueDIBuilder).DIBuilderGetOrCreateTypeArray C.LLVMDIBuilderGetOrCreateTypeArray

func (*OpaqueDIBuilder) DIBuilderInsertDbgValueRecordAtEnd

func (self *OpaqueDIBuilder) DIBuilderInsertDbgValueRecordAtEnd(Val ValueRef, VarInfo MetadataRef, Expr MetadataRef, DebugLoc MetadataRef, Block BasicBlockRef) DbgRecordRef

Only use in "new debug format" (LLVMIsNewDbgInfoFormat() is true). See https://llvm.org/docs/RemoveDIsDebugInfo.html#c-api-changes

The debug format can be switched later after inserting the records using LLVMSetIsNewDbgInfoFormat, if needed for legacy or transitionary reasons.

Insert a new debug record at the end of the given basic block. If the basic block has a terminator instruction, the record is inserted before that terminator instruction. \param Builder The DIBuilder. \param Val The value of the variable. \param VarInfo The variable's debug info descriptor. \param Expr A complex location expression for the variable. \param DebugLoc Debug info location. \param Block Basic block acting as a location for the new record.

llgo:link (*OpaqueDIBuilder).DIBuilderInsertDbgValueRecordAtEnd C.LLVMDIBuilderInsertDbgValueRecordAtEnd

func (*OpaqueDIBuilder) DIBuilderInsertDbgValueRecordBefore

func (self *OpaqueDIBuilder) DIBuilderInsertDbgValueRecordBefore(Val ValueRef, VarInfo MetadataRef, Expr MetadataRef, DebugLoc MetadataRef, Instr ValueRef) DbgRecordRef

Only use in "new debug format" (LLVMIsNewDbgInfoFormat() is true). See https://llvm.org/docs/RemoveDIsDebugInfo.html#c-api-changes

The debug format can be switched later after inserting the records using LLVMSetIsNewDbgInfoFormat, if needed for legacy or transitionary reasons.

Insert a new debug record before the given instruction. \param Builder The DIBuilder. \param Val The value of the variable. \param VarInfo The variable's debug info descriptor. \param Expr A complex location expression for the variable. \param DebugLoc Debug info location. \param Instr Instruction acting as a location for the new record.

llgo:link (*OpaqueDIBuilder).DIBuilderInsertDbgValueRecordBefore C.LLVMDIBuilderInsertDbgValueRecordBefore

func (*OpaqueDIBuilder) DIBuilderInsertDeclareRecordAtEnd

func (self *OpaqueDIBuilder) DIBuilderInsertDeclareRecordAtEnd(Storage ValueRef, VarInfo MetadataRef, Expr MetadataRef, DebugLoc MetadataRef, Block BasicBlockRef) DbgRecordRef

Only use in "new debug format" (LLVMIsNewDbgInfoFormat() is true). See https://llvm.org/docs/RemoveDIsDebugInfo.html#c-api-changes

The debug format can be switched later after inserting the records using LLVMSetIsNewDbgInfoFormat, if needed for legacy or transitionary reasons.

Insert a Declare DbgRecord at the end of the given basic block. If the basic block has a terminator instruction, the record is inserted before that terminator instruction. \param Builder The DIBuilder. \param Storage The storage of the variable to declare. \param VarInfo The variable's debug info descriptor. \param Expr A complex location expression for the variable. \param DebugLoc Debug info location. \param Block Basic block acting as a location for the new record.

llgo:link (*OpaqueDIBuilder).DIBuilderInsertDeclareRecordAtEnd C.LLVMDIBuilderInsertDeclareRecordAtEnd

func (*OpaqueDIBuilder) DIBuilderInsertDeclareRecordBefore

func (self *OpaqueDIBuilder) DIBuilderInsertDeclareRecordBefore(Storage ValueRef, VarInfo MetadataRef, Expr MetadataRef, DebugLoc MetadataRef, Instr ValueRef) DbgRecordRef

Only use in "new debug format" (LLVMIsNewDbgInfoFormat() is true). See https://llvm.org/docs/RemoveDIsDebugInfo.html#c-api-changes

The debug format can be switched later after inserting the records using LLVMSetIsNewDbgInfoFormat, if needed for legacy or transitionary reasons.

Insert a Declare DbgRecord before the given instruction. \param Builder The DIBuilder. \param Storage The storage of the variable to declare. \param VarInfo The variable's debug info descriptor. \param Expr A complex location expression for the variable. \param DebugLoc Debug info location. \param Instr Instruction acting as a location for the new record.

llgo:link (*OpaqueDIBuilder).DIBuilderInsertDeclareRecordBefore C.LLVMDIBuilderInsertDeclareRecordBefore

func (*OpaqueDIBuilder) DIBuilderInsertLabelAtEnd

func (self *OpaqueDIBuilder) DIBuilderInsertLabelAtEnd(LabelInfo MetadataRef, Location MetadataRef, InsertAtEnd BasicBlockRef) DbgRecordRef

Insert a new llvm.dbg.label intrinsic call

\param Builder The DIBuilder. \param LabelInfo The Label's debug info descriptor \param Location The debug info location \param InsertAtEnd Location for the new intrinsic.

@see llvm::DIBuilder::insertLabel()

llgo:link (*OpaqueDIBuilder).DIBuilderInsertLabelAtEnd C.LLVMDIBuilderInsertLabelAtEnd

func (*OpaqueDIBuilder) DIBuilderInsertLabelBefore

func (self *OpaqueDIBuilder) DIBuilderInsertLabelBefore(LabelInfo MetadataRef, Location MetadataRef, InsertBefore ValueRef) DbgRecordRef

Insert a new llvm.dbg.label intrinsic call

\param Builder The DIBuilder. \param LabelInfo The Label's debug info descriptor \param Location The debug info location \param InsertBefore Location for the new intrinsic.

@see llvm::DIBuilder::insertLabel()

llgo:link (*OpaqueDIBuilder).DIBuilderInsertLabelBefore C.LLVMDIBuilderInsertLabelBefore

func (*OpaqueDIBuilder) DisposeDIBuilder

func (self *OpaqueDIBuilder) DisposeDIBuilder()

Deallocates the \c DIBuilder and everything it owns. @note You must call \c LLVMDIBuilderFinalize before this

llgo:link (*OpaqueDIBuilder).DisposeDIBuilder C.LLVMDisposeDIBuilder

func (*OpaqueDIBuilder) ReplaceArrays

func (self *OpaqueDIBuilder) ReplaceArrays(T *MetadataRef, Elements *MetadataRef, NumElements c.Uint)

Replace arrays.

@see DIBuilder::replaceArrays()

llgo:link (*OpaqueDIBuilder).ReplaceArrays C.LLVMReplaceArrays

type OpaqueDbgRecord

type OpaqueDbgRecord struct {
}

func (*OpaqueDbgRecord) DbgRecordGetDebugLoc

func (self *OpaqueDbgRecord) DbgRecordGetDebugLoc() MetadataRef

Get the debug location attached to the debug record.

@see llvm::DbgRecord::getDebugLoc()

llgo:link (*OpaqueDbgRecord).DbgRecordGetDebugLoc C.LLVMDbgRecordGetDebugLoc

func (*OpaqueDbgRecord) DbgRecordGetKind

func (self *OpaqueDbgRecord) DbgRecordGetKind() DbgRecordKind

llgo:link (*OpaqueDbgRecord).DbgRecordGetKind C.LLVMDbgRecordGetKind

func (*OpaqueDbgRecord) DbgVariableRecordGetExpression

func (self *OpaqueDbgRecord) DbgVariableRecordGetExpression() MetadataRef

Get the debug info expression of the DbgVariableRecord.

@see llvm::DbgVariableRecord::getExpression()

llgo:link (*OpaqueDbgRecord).DbgVariableRecordGetExpression C.LLVMDbgVariableRecordGetExpression

func (*OpaqueDbgRecord) DbgVariableRecordGetValue

func (self *OpaqueDbgRecord) DbgVariableRecordGetValue(OpIdx c.Uint) ValueRef

Get the value of the DbgVariableRecord.

@see llvm::DbgVariableRecord::getValue()

llgo:link (*OpaqueDbgRecord).DbgVariableRecordGetValue C.LLVMDbgVariableRecordGetValue

func (*OpaqueDbgRecord) DbgVariableRecordGetVariable

func (self *OpaqueDbgRecord) DbgVariableRecordGetVariable() MetadataRef

Get the debug info variable of the DbgVariableRecord.

@see llvm::DbgVariableRecord::getVariable()

llgo:link (*OpaqueDbgRecord).DbgVariableRecordGetVariable C.LLVMDbgVariableRecordGetVariable

func (*OpaqueDbgRecord) NextDbgRecord

func (self *OpaqueDbgRecord) NextDbgRecord() DbgRecordRef

Obtain the next DbgRecord in the sequence or NULL if there are no more.

@see llvm::Instruction::getDbgRecordRange()

llgo:link (*OpaqueDbgRecord).NextDbgRecord C.LLVMGetNextDbgRecord

func (*OpaqueDbgRecord) PreviousDbgRecord

func (self *OpaqueDbgRecord) PreviousDbgRecord() DbgRecordRef

Obtain the previous DbgRecord in the sequence or NULL if there are no more.

@see llvm::Instruction::getDbgRecordRange()

llgo:link (*OpaqueDbgRecord).PreviousDbgRecord C.LLVMGetPreviousDbgRecord

func (*OpaqueDbgRecord) PrintDbgRecordToString

func (self *OpaqueDbgRecord) PrintDbgRecordToString() *c.Char

Return a string representation of the DbgRecord. Use LLVMDisposeMessage to free the string.

@see llvm::DbgRecord::print()

llgo:link (*OpaqueDbgRecord).PrintDbgRecordToString C.LLVMPrintDbgRecordToString

type OpaqueDiagnosticInfo

type OpaqueDiagnosticInfo struct {
}

func (*OpaqueDiagnosticInfo) DiagInfoDescription

func (self *OpaqueDiagnosticInfo) DiagInfoDescription() *c.Char

Return a string representation of the DiagnosticInfo. Use LLVMDisposeMessage to free the string.

@see DiagnosticInfo::print()

llgo:link (*OpaqueDiagnosticInfo).DiagInfoDescription C.LLVMGetDiagInfoDescription

func (*OpaqueDiagnosticInfo) DiagInfoSeverity

func (self *OpaqueDiagnosticInfo) DiagInfoSeverity() DiagnosticSeverity

Return an enum LLVMDiagnosticSeverity.

@see DiagnosticInfo::getSeverity()

llgo:link (*OpaqueDiagnosticInfo).DiagInfoSeverity C.LLVMGetDiagInfoSeverity

type OpaqueError

type OpaqueError struct {
}

func (*OpaqueError) CantFail

func (self *OpaqueError) CantFail()

Report a fatal error if Err is a failure value.

This function can be used to wrap calls to fallible functions ONLY when it is known that the Error will always be a success value.

llgo:link (*OpaqueError).CantFail C.LLVMCantFail

func (*OpaqueError) ConsumeError

func (self *OpaqueError) ConsumeError()

Dispose of the given error without handling it. This operation consumes the error, and the given LLVMErrorRef value is not usable once this call returns. Note: This method *only* needs to be called if the error is not being passed to some other consuming operation, e.g. LLVMGetErrorMessage.

llgo:link (*OpaqueError).ConsumeError C.LLVMConsumeError

func (*OpaqueError) ErrorMessage

func (self *OpaqueError) ErrorMessage() *c.Char

Returns the given string's error message. This operation consumes the error, and the given LLVMErrorRef value is not usable once this call returns. The caller is responsible for disposing of the string by calling LLVMDisposeErrorMessage.

llgo:link (*OpaqueError).ErrorMessage C.LLVMGetErrorMessage

func (*OpaqueError) ErrorTypeId

func (self *OpaqueError) ErrorTypeId() ErrorTypeId

Returns the type id for the given error instance, which must be a failure value (i.e. non-null).

llgo:link (*OpaqueError).ErrorTypeId C.LLVMGetErrorTypeId

type OpaqueExecutionEngine

type OpaqueExecutionEngine struct {
}

func (*OpaqueExecutionEngine) AddGlobalMapping

func (self *OpaqueExecutionEngine) AddGlobalMapping(Global ValueRef, Addr unsafe.Pointer)

llgo:link (*OpaqueExecutionEngine).AddGlobalMapping C.LLVMAddGlobalMapping

func (*OpaqueExecutionEngine) AddModule

func (self *OpaqueExecutionEngine) AddModule(M ModuleRef)

llgo:link (*OpaqueExecutionEngine).AddModule C.LLVMAddModule

func (*OpaqueExecutionEngine) CreateExecutionEngineForModule

func (self *OpaqueExecutionEngine) CreateExecutionEngineForModule(M ModuleRef, OutError **c.Char) Bool

llgo:link (*OpaqueExecutionEngine).CreateExecutionEngineForModule C.LLVMCreateExecutionEngineForModule

func (*OpaqueExecutionEngine) CreateInterpreterForModule

func (self *OpaqueExecutionEngine) CreateInterpreterForModule(M ModuleRef, OutError **c.Char) Bool

llgo:link (*OpaqueExecutionEngine).CreateInterpreterForModule C.LLVMCreateInterpreterForModule

func (*OpaqueExecutionEngine) CreateJITCompilerForModule

func (self *OpaqueExecutionEngine) CreateJITCompilerForModule(M ModuleRef, OptLevel c.Uint, OutError **c.Char) Bool

llgo:link (*OpaqueExecutionEngine).CreateJITCompilerForModule C.LLVMCreateJITCompilerForModule

func (*OpaqueExecutionEngine) CreateMCJITCompilerForModule

func (self *OpaqueExecutionEngine) CreateMCJITCompilerForModule(M ModuleRef, Options *MCJITCompilerOptions, SizeOfOptions c.SizeT, OutError **c.Char) Bool

Create an MCJIT execution engine for a module, with the given options. It is the responsibility of the caller to ensure that all fields in Options up to the given SizeOfOptions are initialized. It is correct to pass a smaller value of SizeOfOptions that omits some fields. The canonical way of using this is:

LLVMMCJITCompilerOptions options; LLVMInitializeMCJITCompilerOptions(&options, sizeof(options)); ... fill in those options you care about LLVMCreateMCJITCompilerForModule(&jit, mod, &options, sizeof(options),

&error);

Note that this is also correct, though possibly suboptimal:

LLVMCreateMCJITCompilerForModule(&jit, mod, 0, 0, &error);

llgo:link (*OpaqueExecutionEngine).CreateMCJITCompilerForModule C.LLVMCreateMCJITCompilerForModule

func (*OpaqueExecutionEngine) DisposeExecutionEngine

func (self *OpaqueExecutionEngine) DisposeExecutionEngine()

llgo:link (*OpaqueExecutionEngine).DisposeExecutionEngine C.LLVMDisposeExecutionEngine

func (*OpaqueExecutionEngine) ExecutionEngineGetErrMsg

func (self *OpaqueExecutionEngine) ExecutionEngineGetErrMsg(OutError **c.Char) Bool

Returns true on error, false on success. If true is returned then the error message is copied to OutStr and cleared in the ExecutionEngine instance.

llgo:link (*OpaqueExecutionEngine).ExecutionEngineGetErrMsg C.LLVMExecutionEngineGetErrMsg

func (*OpaqueExecutionEngine) ExecutionEngineTargetData

func (self *OpaqueExecutionEngine) ExecutionEngineTargetData() TargetDataRef

llgo:link (*OpaqueExecutionEngine).ExecutionEngineTargetData C.LLVMGetExecutionEngineTargetData

func (*OpaqueExecutionEngine) ExecutionEngineTargetMachine

func (self *OpaqueExecutionEngine) ExecutionEngineTargetMachine() TargetMachineRef

llgo:link (*OpaqueExecutionEngine).ExecutionEngineTargetMachine C.LLVMGetExecutionEngineTargetMachine

func (*OpaqueExecutionEngine) FindFunction

func (self *OpaqueExecutionEngine) FindFunction(Name *c.Char, OutFn *ValueRef) Bool

llgo:link (*OpaqueExecutionEngine).FindFunction C.LLVMFindFunction

func (*OpaqueExecutionEngine) FreeMachineCodeForFunction

func (self *OpaqueExecutionEngine) FreeMachineCodeForFunction(F ValueRef)

llgo:link (*OpaqueExecutionEngine).FreeMachineCodeForFunction C.LLVMFreeMachineCodeForFunction

func (*OpaqueExecutionEngine) FunctionAddress

func (self *OpaqueExecutionEngine) FunctionAddress(Name *c.Char) c.Uint64T

llgo:link (*OpaqueExecutionEngine).FunctionAddress C.LLVMGetFunctionAddress

func (*OpaqueExecutionEngine) GlobalValueAddress

func (self *OpaqueExecutionEngine) GlobalValueAddress(Name *c.Char) c.Uint64T

llgo:link (*OpaqueExecutionEngine).GlobalValueAddress C.LLVMGetGlobalValueAddress

func (*OpaqueExecutionEngine) PointerToGlobal

func (self *OpaqueExecutionEngine) PointerToGlobal(Global ValueRef) unsafe.Pointer

llgo:link (*OpaqueExecutionEngine).PointerToGlobal C.LLVMGetPointerToGlobal

func (*OpaqueExecutionEngine) RecompileAndRelinkFunction

func (self *OpaqueExecutionEngine) RecompileAndRelinkFunction(Fn ValueRef) unsafe.Pointer

llgo:link (*OpaqueExecutionEngine).RecompileAndRelinkFunction C.LLVMRecompileAndRelinkFunction

func (*OpaqueExecutionEngine) RemoveModule

func (self *OpaqueExecutionEngine) RemoveModule(M ModuleRef, OutMod *ModuleRef, OutError **c.Char) Bool

llgo:link (*OpaqueExecutionEngine).RemoveModule C.LLVMRemoveModule

func (*OpaqueExecutionEngine) RunFunction

func (self *OpaqueExecutionEngine) RunFunction(F ValueRef, NumArgs c.Uint, Args *GenericValueRef) GenericValueRef

llgo:link (*OpaqueExecutionEngine).RunFunction C.LLVMRunFunction

func (*OpaqueExecutionEngine) RunFunctionAsMain

func (self *OpaqueExecutionEngine) RunFunctionAsMain(F ValueRef, ArgC c.Uint, ArgV **c.Char, EnvP **c.Char) c.Int

llgo:link (*OpaqueExecutionEngine).RunFunctionAsMain C.LLVMRunFunctionAsMain

func (*OpaqueExecutionEngine) RunStaticConstructors

func (self *OpaqueExecutionEngine) RunStaticConstructors()

llgo:link (*OpaqueExecutionEngine).RunStaticConstructors C.LLVMRunStaticConstructors

func (*OpaqueExecutionEngine) RunStaticDestructors

func (self *OpaqueExecutionEngine) RunStaticDestructors()

llgo:link (*OpaqueExecutionEngine).RunStaticDestructors C.LLVMRunStaticDestructors

type OpaqueGenericValue

type OpaqueGenericValue struct {
}

func (*OpaqueGenericValue) DisposeGenericValue

func (self *OpaqueGenericValue) DisposeGenericValue()

llgo:link (*OpaqueGenericValue).DisposeGenericValue C.LLVMDisposeGenericValue

func (*OpaqueGenericValue) GenericValueIntWidth

func (self *OpaqueGenericValue) GenericValueIntWidth() c.Uint

llgo:link (*OpaqueGenericValue).GenericValueIntWidth C.LLVMGenericValueIntWidth

func (*OpaqueGenericValue) GenericValueToInt

func (self *OpaqueGenericValue) GenericValueToInt(IsSigned Bool) c.UlongLong

llgo:link (*OpaqueGenericValue).GenericValueToInt C.LLVMGenericValueToInt

func (*OpaqueGenericValue) GenericValueToPointer

func (self *OpaqueGenericValue) GenericValueToPointer() unsafe.Pointer

llgo:link (*OpaqueGenericValue).GenericValueToPointer C.LLVMGenericValueToPointer

type OpaqueJITEventListener

type OpaqueJITEventListener struct {
}

type OpaqueLTOCodeGenerator

type OpaqueLTOCodeGenerator struct {
}

func (*OpaqueLTOCodeGenerator) LtoCodegenAddModule

func (self *OpaqueLTOCodeGenerator) LtoCodegenAddModule(mod LtoModuleT) LtoBoolT

Add an object module to the set of modules for which code will be generated. Returns true on error (check lto_get_error_message() for details).

\c cg and \c mod must both be in the same context. See \a lto_codegen_create_in_local_context() and \a lto_module_create_in_codegen_context().

\since prior to LTO_API_VERSION=3

llgo:link (*OpaqueLTOCodeGenerator).LtoCodegenAddModule C.lto_codegen_add_module

func (*OpaqueLTOCodeGenerator) LtoCodegenAddMustPreserveSymbol

func (self *OpaqueLTOCodeGenerator) LtoCodegenAddMustPreserveSymbol(symbol *c.Char)

Adds to a list of all global symbols that must exist in the final generated code. If a function is not listed there, it might be inlined into every usage and optimized away.

\since prior to LTO_API_VERSION=3

llgo:link (*OpaqueLTOCodeGenerator).LtoCodegenAddMustPreserveSymbol C.lto_codegen_add_must_preserve_symbol

func (*OpaqueLTOCodeGenerator) LtoCodegenCompile

func (self *OpaqueLTOCodeGenerator) LtoCodegenCompile(length *c.SizeT) unsafe.Pointer

Generates code for all added modules into one native object file. This calls lto_codegen_optimize then lto_codegen_compile_optimized.

On success returns a pointer to a generated mach-o/ELF buffer and length set to the buffer size. The buffer is owned by the lto_code_gen_t and will be freed when lto_codegen_dispose() is called, or lto_codegen_compile() is called again. On failure, returns NULL (check lto_get_error_message() for details).

\since prior to LTO_API_VERSION=3

llgo:link (*OpaqueLTOCodeGenerator).LtoCodegenCompile C.lto_codegen_compile

func (*OpaqueLTOCodeGenerator) LtoCodegenCompileOptimized

func (self *OpaqueLTOCodeGenerator) LtoCodegenCompileOptimized(length *c.SizeT) unsafe.Pointer

Generates code for the optimized merged module into one native object file. It will not run any IR optimizations on the merged module.

On success returns a pointer to a generated mach-o/ELF buffer and length set to the buffer size. The buffer is owned by the lto_code_gen_t and will be freed when lto_codegen_dispose() is called, or lto_codegen_compile_optimized() is called again. On failure, returns NULL (check lto_get_error_message() for details).

\since LTO_API_VERSION=12

llgo:link (*OpaqueLTOCodeGenerator).LtoCodegenCompileOptimized C.lto_codegen_compile_optimized

func (*OpaqueLTOCodeGenerator) LtoCodegenCompileToFile

func (self *OpaqueLTOCodeGenerator) LtoCodegenCompileToFile(name **c.Char) LtoBoolT

Generates code for all added modules into one native object file. This calls lto_codegen_optimize then lto_codegen_compile_optimized (instead of returning a generated mach-o/ELF buffer, it writes to a file).

The name of the file is written to name. Returns true on error.

\since LTO_API_VERSION=5

llgo:link (*OpaqueLTOCodeGenerator).LtoCodegenCompileToFile C.lto_codegen_compile_to_file

func (*OpaqueLTOCodeGenerator) LtoCodegenDebugOptions

func (self *OpaqueLTOCodeGenerator) LtoCodegenDebugOptions(_llcppg_param2 *c.Char)

Sets options to help debug codegen bugs. Since parsing shud only happen once, only one of lto_codegen_debug_options or lto_set_debug_options should be called.

This function takes one or more options separated by spaces. Warning: passing file paths through this function may confuse the argument parser if the paths contain spaces.

\since prior to LTO_API_VERSION=3

llgo:link (*OpaqueLTOCodeGenerator).LtoCodegenDebugOptions C.lto_codegen_debug_options

func (*OpaqueLTOCodeGenerator) LtoCodegenDebugOptionsArray

func (self *OpaqueLTOCodeGenerator) LtoCodegenDebugOptionsArray(_llcppg_param2 **c.Char, number c.Int)

Same as the previous function, but takes every option separately through an array.

\since prior to LTO_API_VERSION=26

llgo:link (*OpaqueLTOCodeGenerator).LtoCodegenDebugOptionsArray C.lto_codegen_debug_options_array

func (*OpaqueLTOCodeGenerator) LtoCodegenDispose

func (self *OpaqueLTOCodeGenerator) LtoCodegenDispose()

Frees all code generator and all memory it internally allocated. Upon return the lto_code_gen_t is no longer valid.

\since prior to LTO_API_VERSION=3

llgo:link (*OpaqueLTOCodeGenerator).LtoCodegenDispose C.lto_codegen_dispose

func (*OpaqueLTOCodeGenerator) LtoCodegenOptimize

func (self *OpaqueLTOCodeGenerator) LtoCodegenOptimize() LtoBoolT

Runs optimization for the merged module. Returns true on error.

\since LTO_API_VERSION=12

llgo:link (*OpaqueLTOCodeGenerator).LtoCodegenOptimize C.lto_codegen_optimize

func (*OpaqueLTOCodeGenerator) LtoCodegenSetAssemblerArgs

func (self *OpaqueLTOCodeGenerator) LtoCodegenSetAssemblerArgs(args **c.Char, nargs c.Int)

Sets extra arguments that libLTO should pass to the assembler.

\since LTO_API_VERSION=4

llgo:link (*OpaqueLTOCodeGenerator).LtoCodegenSetAssemblerArgs C.lto_codegen_set_assembler_args

func (*OpaqueLTOCodeGenerator) LtoCodegenSetAssemblerPath

func (self *OpaqueLTOCodeGenerator) LtoCodegenSetAssemblerPath(path *c.Char)

Sets the location of the assembler tool to run. If not set, libLTO will use gcc to invoke the assembler.

\since LTO_API_VERSION=3

llgo:link (*OpaqueLTOCodeGenerator).LtoCodegenSetAssemblerPath C.lto_codegen_set_assembler_path

func (*OpaqueLTOCodeGenerator) LtoCodegenSetCpu

func (self *OpaqueLTOCodeGenerator) LtoCodegenSetCpu(cpu *c.Char)

Sets the cpu to generate code for.

\since LTO_API_VERSION=4

llgo:link (*OpaqueLTOCodeGenerator).LtoCodegenSetCpu C.lto_codegen_set_cpu

func (*OpaqueLTOCodeGenerator) LtoCodegenSetDebugModel

func (self *OpaqueLTOCodeGenerator) LtoCodegenSetDebugModel(_llcppg_param2 LtoDebugModel) LtoBoolT

Sets if debug info should be generated. Returns true on error (check lto_get_error_message() for details).

\since prior to LTO_API_VERSION=3

llgo:link (*OpaqueLTOCodeGenerator).LtoCodegenSetDebugModel C.lto_codegen_set_debug_model

func (*OpaqueLTOCodeGenerator) LtoCodegenSetModule

func (self *OpaqueLTOCodeGenerator) LtoCodegenSetModule(mod LtoModuleT)

Sets the object module for code generation. This will transfer the ownership of the module to the code generator.

\c cg and \c mod must both be in the same context.

\since LTO_API_VERSION=13

llgo:link (*OpaqueLTOCodeGenerator).LtoCodegenSetModule C.lto_codegen_set_module

func (*OpaqueLTOCodeGenerator) LtoCodegenSetPicModel

func (self *OpaqueLTOCodeGenerator) LtoCodegenSetPicModel(_llcppg_param2 LtoCodegenModel) LtoBoolT

Sets which PIC code model to generated. Returns true on error (check lto_get_error_message() for details).

\since prior to LTO_API_VERSION=3

llgo:link (*OpaqueLTOCodeGenerator).LtoCodegenSetPicModel C.lto_codegen_set_pic_model

func (*OpaqueLTOCodeGenerator) LtoCodegenSetShouldEmbedUselists

func (self *OpaqueLTOCodeGenerator) LtoCodegenSetShouldEmbedUselists(ShouldEmbedUselists LtoBoolT)

Set whether to embed uselists in bitcode.

Sets whether \a lto_codegen_write_merged_modules() should embed uselists in output bitcode. This should be turned on for all -save-temps output.

\since LTO_API_VERSION=15

llgo:link (*OpaqueLTOCodeGenerator).LtoCodegenSetShouldEmbedUselists C.lto_codegen_set_should_embed_uselists

func (*OpaqueLTOCodeGenerator) LtoCodegenSetShouldInternalize

func (self *OpaqueLTOCodeGenerator) LtoCodegenSetShouldInternalize(ShouldInternalize LtoBoolT)

Sets if we should run internalize pass during optimization and code generation.

\since LTO_API_VERSION=14

llgo:link (*OpaqueLTOCodeGenerator).LtoCodegenSetShouldInternalize C.lto_codegen_set_should_internalize

func (*OpaqueLTOCodeGenerator) LtoCodegenWriteMergedModules

func (self *OpaqueLTOCodeGenerator) LtoCodegenWriteMergedModules(path *c.Char) LtoBoolT

Writes a new object file at the specified path that contains the merged contents of all modules added so far. Returns true on error (check lto_get_error_message() for details).

\since LTO_API_VERSION=5

llgo:link (*OpaqueLTOCodeGenerator).LtoCodegenWriteMergedModules C.lto_codegen_write_merged_modules

type OpaqueLTOInput

type OpaqueLTOInput struct {
}

func (*OpaqueLTOInput) LtoInputDispose

func (self *OpaqueLTOInput) LtoInputDispose()

Frees all memory internally allocated by the LTO input file. Upon return the lto_module_t is no longer valid.

\since LTO_API_VERSION=24

llgo:link (*OpaqueLTOInput).LtoInputDispose C.lto_input_dispose

func (*OpaqueLTOInput) LtoInputGetDependentLibrary

func (self *OpaqueLTOInput) LtoInputGetDependentLibrary(index c.SizeT, size *c.SizeT) *c.Char

Returns the ith dependent library specifier for the given LTO input file. The returned string is not null-terminated.

\since LTO_API_VERSION=24

llgo:link (*OpaqueLTOInput).LtoInputGetDependentLibrary C.lto_input_get_dependent_library

func (*OpaqueLTOInput) LtoInputGetNumDependentLibraries

func (self *OpaqueLTOInput) LtoInputGetNumDependentLibraries() c.Uint

Returns the number of dependent library specifiers for the given LTO input file.

\since LTO_API_VERSION=24

llgo:link (*OpaqueLTOInput).LtoInputGetNumDependentLibraries C.lto_input_get_num_dependent_libraries

type OpaqueLTOModule

type OpaqueLTOModule struct {
}

func (*OpaqueLTOModule) LtoModuleDispose

func (self *OpaqueLTOModule) LtoModuleDispose()

Frees all memory internally allocated by the module. Upon return the lto_module_t is no longer valid.

\since prior to LTO_API_VERSION=3

llgo:link (*OpaqueLTOModule).LtoModuleDispose C.lto_module_dispose

func (*OpaqueLTOModule) LtoModuleGetAsmUndefSymbolName

func (self *OpaqueLTOModule) LtoModuleGetAsmUndefSymbolName(index c.Uint) *c.Char

Returns the name of the ith asm undefined symbol in the object module.

\since prior to LTO_API_VERSION=30

llgo:link (*OpaqueLTOModule).LtoModuleGetAsmUndefSymbolName C.lto_module_get_asm_undef_symbol_name

func (*OpaqueLTOModule) LtoModuleGetLinkeropts

func (self *OpaqueLTOModule) LtoModuleGetLinkeropts() *c.Char

Returns the module's linker options.

The linker options may consist of multiple flags. It is the linker's responsibility to split the flags using a platform-specific mechanism.

\since LTO_API_VERSION=16

llgo:link (*OpaqueLTOModule).LtoModuleGetLinkeropts C.lto_module_get_linkeropts

func (*OpaqueLTOModule) LtoModuleGetMachoCputype

func (self *OpaqueLTOModule) LtoModuleGetMachoCputype(out_cputype *c.Uint, out_cpusubtype *c.Uint) LtoBoolT

If targeting mach-o on darwin, this function gets the CPU type and subtype that will end up being encoded in the mach-o header. These are the values that can be found in mach/machine.h.

\p out_cputype and \p out_cpusubtype must be non-NULL.

Returns true on error (check lto_get_error_message() for details).

\since LTO_API_VERSION=27

llgo:link (*OpaqueLTOModule).LtoModuleGetMachoCputype C.lto_module_get_macho_cputype

func (*OpaqueLTOModule) LtoModuleGetNumAsmUndefSymbols

func (self *OpaqueLTOModule) LtoModuleGetNumAsmUndefSymbols() c.Uint

Returns the number of asm undefined symbols in the object module.

\since prior to LTO_API_VERSION=30

llgo:link (*OpaqueLTOModule).LtoModuleGetNumAsmUndefSymbols C.lto_module_get_num_asm_undef_symbols

func (*OpaqueLTOModule) LtoModuleGetNumSymbols

func (self *OpaqueLTOModule) LtoModuleGetNumSymbols() c.Uint

Returns the number of symbols in the object module.

\since prior to LTO_API_VERSION=3

llgo:link (*OpaqueLTOModule).LtoModuleGetNumSymbols C.lto_module_get_num_symbols

func (*OpaqueLTOModule) LtoModuleGetSymbolAttribute

func (self *OpaqueLTOModule) LtoModuleGetSymbolAttribute(index c.Uint) LtoSymbolAttributes

Returns the attributes of the ith symbol in the object module.

\since prior to LTO_API_VERSION=3

llgo:link (*OpaqueLTOModule).LtoModuleGetSymbolAttribute C.lto_module_get_symbol_attribute

func (*OpaqueLTOModule) LtoModuleGetSymbolName

func (self *OpaqueLTOModule) LtoModuleGetSymbolName(index c.Uint) *c.Char

Returns the name of the ith symbol in the object module.

\since prior to LTO_API_VERSION=3

llgo:link (*OpaqueLTOModule).LtoModuleGetSymbolName C.lto_module_get_symbol_name

func (*OpaqueLTOModule) LtoModuleGetTargetTriple

func (self *OpaqueLTOModule) LtoModuleGetTargetTriple() *c.Char

Returns triple string which the object module was compiled under.

\since prior to LTO_API_VERSION=3

llgo:link (*OpaqueLTOModule).LtoModuleGetTargetTriple C.lto_module_get_target_triple

func (*OpaqueLTOModule) LtoModuleHasCtorDtor

func (self *OpaqueLTOModule) LtoModuleHasCtorDtor() LtoBoolT

This function can be used by the linker to check if a given module has any constructor or destructor functions.

Returns true if the module has either the @llvm.global_ctors or the @llvm.global_dtors symbol. Otherwise returns false.

\since LTO_API_VERSION=29

llgo:link (*OpaqueLTOModule).LtoModuleHasCtorDtor C.lto_module_has_ctor_dtor

func (*OpaqueLTOModule) LtoModuleIsThinlto

func (self *OpaqueLTOModule) LtoModuleIsThinlto() LtoBoolT

Test if a module has support for ThinLTO linking.

\since LTO_API_VERSION=18

llgo:link (*OpaqueLTOModule).LtoModuleIsThinlto C.lto_module_is_thinlto

func (*OpaqueLTOModule) LtoModuleSetTargetTriple

func (self *OpaqueLTOModule) LtoModuleSetTargetTriple(triple *c.Char)

Sets triple string with which the object will be codegened.

\since LTO_API_VERSION=4

llgo:link (*OpaqueLTOModule).LtoModuleSetTargetTriple C.lto_module_set_target_triple

type OpaqueMCJITMemoryManager

type OpaqueMCJITMemoryManager struct {
}

func (*OpaqueMCJITMemoryManager) DisposeMCJITMemoryManager

func (self *OpaqueMCJITMemoryManager) DisposeMCJITMemoryManager()

llgo:link (*OpaqueMCJITMemoryManager).DisposeMCJITMemoryManager C.LLVMDisposeMCJITMemoryManager

type OpaqueMemoryBuffer

type OpaqueMemoryBuffer struct {
}

func (*OpaqueMemoryBuffer) BitcodeModule

func (self *OpaqueMemoryBuffer) BitcodeModule(OutM *ModuleRef, OutMessage **c.Char) Bool

llgo:link (*OpaqueMemoryBuffer).BitcodeModule C.LLVMGetBitcodeModule

func (*OpaqueMemoryBuffer) BitcodeModule2

func (self *OpaqueMemoryBuffer) BitcodeModule2(OutM *ModuleRef) Bool

llgo:link (*OpaqueMemoryBuffer).BitcodeModule2 C.LLVMGetBitcodeModule2

func (*OpaqueMemoryBuffer) BufferSize

func (self *OpaqueMemoryBuffer) BufferSize() c.SizeT

llgo:link (*OpaqueMemoryBuffer).BufferSize C.LLVMGetBufferSize

func (*OpaqueMemoryBuffer) BufferStart

func (self *OpaqueMemoryBuffer) BufferStart() *c.Char

llgo:link (*OpaqueMemoryBuffer).BufferStart C.LLVMGetBufferStart

func (*OpaqueMemoryBuffer) CreateBinary

func (self *OpaqueMemoryBuffer) CreateBinary(Context ContextRef, ErrorMessage **c.Char) BinaryRef

Create a binary file from the given memory buffer.

The exact type of the binary file will be inferred automatically, and the appropriate implementation selected. The context may be NULL except if the resulting file is an LLVM IR file.

The memory buffer is not consumed by this function. It is the responsibility of the caller to free it with \c LLVMDisposeMemoryBuffer.

If NULL is returned, the \p ErrorMessage parameter is populated with the error's description. It is then the caller's responsibility to free this message by calling \c LLVMDisposeMessage.

@see llvm::object::createBinary

llgo:link (*OpaqueMemoryBuffer).CreateBinary C.LLVMCreateBinary

func (*OpaqueMemoryBuffer) CreateMemoryBufferWithSTDIN

func (self *OpaqueMemoryBuffer) CreateMemoryBufferWithSTDIN(OutMessage **c.Char) Bool

llgo:link (*OpaqueMemoryBuffer).CreateMemoryBufferWithSTDIN C.LLVMCreateMemoryBufferWithSTDIN

func (*OpaqueMemoryBuffer) CreateObjectFile deprecated

func (self *OpaqueMemoryBuffer) CreateObjectFile() ObjectFileRef

Deprecated: Use LLVMCreateBinary instead.

llgo:link (*OpaqueMemoryBuffer).CreateObjectFile C.LLVMCreateObjectFile

func (*OpaqueMemoryBuffer) DisposeMemoryBuffer

func (self *OpaqueMemoryBuffer) DisposeMemoryBuffer()

llgo:link (*OpaqueMemoryBuffer).DisposeMemoryBuffer C.LLVMDisposeMemoryBuffer

func (*OpaqueMemoryBuffer) ParseBitcode

func (self *OpaqueMemoryBuffer) ParseBitcode(OutModule *ModuleRef, OutMessage **c.Char) Bool

@defgroup LLVMCBitReader Bit Reader @ingroup LLVMC

@{

llgo:link (*OpaqueMemoryBuffer).ParseBitcode C.LLVMParseBitcode

func (*OpaqueMemoryBuffer) ParseBitcode2

func (self *OpaqueMemoryBuffer) ParseBitcode2(OutModule *ModuleRef) Bool

llgo:link (*OpaqueMemoryBuffer).ParseBitcode2 C.LLVMParseBitcode2

type OpaqueMetadata

type OpaqueMetadata struct {
}

func (*OpaqueMetadata) DIFileGetDirectory

func (self *OpaqueMetadata) DIFileGetDirectory(Len *c.Uint) *c.Char

Get the directory of a given file. \param File The file object. \param Len The length of the returned string.

@see DIFile::getDirectory()

llgo:link (*OpaqueMetadata).DIFileGetDirectory C.LLVMDIFileGetDirectory

func (*OpaqueMetadata) DIFileGetFilename

func (self *OpaqueMetadata) DIFileGetFilename(Len *c.Uint) *c.Char

Get the name of a given file. \param File The file object. \param Len The length of the returned string.

@see DIFile::getFilename()

llgo:link (*OpaqueMetadata).DIFileGetFilename C.LLVMDIFileGetFilename

func (*OpaqueMetadata) DIFileGetSource

func (self *OpaqueMetadata) DIFileGetSource(Len *c.Uint) *c.Char

Get the source of a given file. \param File The file object. \param Len The length of the returned string.

@see DIFile::getSource()

llgo:link (*OpaqueMetadata).DIFileGetSource C.LLVMDIFileGetSource

func (*OpaqueMetadata) DIGlobalVariableExpressionGetExpression

func (self *OpaqueMetadata) DIGlobalVariableExpressionGetExpression() MetadataRef

Retrieves the \c DIExpression associated with this global variable expression. \param GVE The global variable expression.

@see llvm::DIGlobalVariableExpression::getExpression()

llgo:link (*OpaqueMetadata).DIGlobalVariableExpressionGetExpression C.LLVMDIGlobalVariableExpressionGetExpression

func (*OpaqueMetadata) DIGlobalVariableExpressionGetVariable

func (self *OpaqueMetadata) DIGlobalVariableExpressionGetVariable() MetadataRef

Retrieves the \c DIVariable associated with this global variable expression. \param GVE The global variable expression.

@see llvm::DIGlobalVariableExpression::getVariable()

llgo:link (*OpaqueMetadata).DIGlobalVariableExpressionGetVariable C.LLVMDIGlobalVariableExpressionGetVariable

func (*OpaqueMetadata) DILocationGetColumn

func (self *OpaqueMetadata) DILocationGetColumn() c.Uint

Get the column number of this debug location. \param Location The debug location.

@see DILocation::getColumn()

llgo:link (*OpaqueMetadata).DILocationGetColumn C.LLVMDILocationGetColumn

func (*OpaqueMetadata) DILocationGetInlinedAt

func (self *OpaqueMetadata) DILocationGetInlinedAt() MetadataRef

Get the "inline at" location associated with this debug location. \param Location The debug location.

@see DILocation::getInlinedAt()

llgo:link (*OpaqueMetadata).DILocationGetInlinedAt C.LLVMDILocationGetInlinedAt

func (*OpaqueMetadata) DILocationGetLine

func (self *OpaqueMetadata) DILocationGetLine() c.Uint

Get the line number of this debug location. \param Location The debug location.

@see DILocation::getLine()

llgo:link (*OpaqueMetadata).DILocationGetLine C.LLVMDILocationGetLine

func (*OpaqueMetadata) DILocationGetScope

func (self *OpaqueMetadata) DILocationGetScope() MetadataRef

Get the local scope associated with this debug location. \param Location The debug location.

@see DILocation::getScope()

llgo:link (*OpaqueMetadata).DILocationGetScope C.LLVMDILocationGetScope

func (*OpaqueMetadata) DINodeTag

func (self *OpaqueMetadata) DINodeTag() c.Uint16T

Get the dwarf::Tag of a DINode

llgo:link (*OpaqueMetadata).DINodeTag C.LLVMGetDINodeTag

func (*OpaqueMetadata) DIScopeGetFile

func (self *OpaqueMetadata) DIScopeGetFile() MetadataRef

Get the metadata of the file associated with a given scope. \param Scope The scope object.

@see DIScope::getFile()

llgo:link (*OpaqueMetadata).DIScopeGetFile C.LLVMDIScopeGetFile

func (*OpaqueMetadata) DISubprogramGetLine

func (self *OpaqueMetadata) DISubprogramGetLine() c.Uint

Get the line associated with a given subprogram. \param Subprogram The subprogram object.

@see DISubprogram::getLine()

llgo:link (*OpaqueMetadata).DISubprogramGetLine C.LLVMDISubprogramGetLine

func (*OpaqueMetadata) DITypeGetAlignInBits

func (self *OpaqueMetadata) DITypeGetAlignInBits() c.Uint32T

Get the alignment of this DIType in bits. \param DType The DIType.

@see DIType::getAlignInBits()

llgo:link (*OpaqueMetadata).DITypeGetAlignInBits C.LLVMDITypeGetAlignInBits

func (*OpaqueMetadata) DITypeGetFlags

func (self *OpaqueMetadata) DITypeGetFlags() DIFlags

Get the flags associated with this DIType. \param DType The DIType.

@see DIType::getFlags()

llgo:link (*OpaqueMetadata).DITypeGetFlags C.LLVMDITypeGetFlags

func (*OpaqueMetadata) DITypeGetLine

func (self *OpaqueMetadata) DITypeGetLine() c.Uint

Get the source line where this DIType is declared. \param DType The DIType.

@see DIType::getLine()

llgo:link (*OpaqueMetadata).DITypeGetLine C.LLVMDITypeGetLine

func (*OpaqueMetadata) DITypeGetName

func (self *OpaqueMetadata) DITypeGetName(Length *c.SizeT) *c.Char

Get the name of this DIType. \param DType The DIType. \param Length The length of the returned string.

@see DIType::getName()

llgo:link (*OpaqueMetadata).DITypeGetName C.LLVMDITypeGetName

func (*OpaqueMetadata) DITypeGetOffsetInBits

func (self *OpaqueMetadata) DITypeGetOffsetInBits() c.Uint64T

Get the offset of this DIType in bits. \param DType The DIType.

@see DIType::getOffsetInBits()

llgo:link (*OpaqueMetadata).DITypeGetOffsetInBits C.LLVMDITypeGetOffsetInBits

func (*OpaqueMetadata) DITypeGetSizeInBits

func (self *OpaqueMetadata) DITypeGetSizeInBits() c.Uint64T

Get the size of this DIType in bits. \param DType The DIType.

@see DIType::getSizeInBits()

llgo:link (*OpaqueMetadata).DITypeGetSizeInBits C.LLVMDITypeGetSizeInBits

func (*OpaqueMetadata) DIVariableGetFile

func (self *OpaqueMetadata) DIVariableGetFile() MetadataRef

Get the metadata of the file associated with a given variable. \param Var The variable object.

@see DIVariable::getFile()

llgo:link (*OpaqueMetadata).DIVariableGetFile C.LLVMDIVariableGetFile

func (*OpaqueMetadata) DIVariableGetLine

func (self *OpaqueMetadata) DIVariableGetLine() c.Uint

Get the source line where this \c DIVariable is declared. \param Var The DIVariable.

@see DIVariable::getLine()

llgo:link (*OpaqueMetadata).DIVariableGetLine C.LLVMDIVariableGetLine

func (*OpaqueMetadata) DIVariableGetScope

func (self *OpaqueMetadata) DIVariableGetScope() MetadataRef

Get the metadata of the scope associated with a given variable. \param Var The variable object.

@see DIVariable::getScope()

llgo:link (*OpaqueMetadata).DIVariableGetScope C.LLVMDIVariableGetScope

func (*OpaqueMetadata) DisposeTemporaryMDNode

func (self *OpaqueMetadata) DisposeTemporaryMDNode()

Deallocate a temporary node.

Calls \c replaceAllUsesWith(nullptr) before deleting, so any remaining references will be reset. \param TempNode The temporary metadata node.

llgo:link (*OpaqueMetadata).DisposeTemporaryMDNode C.LLVMDisposeTemporaryMDNode

func (*OpaqueMetadata) MetadataKind

func (self *OpaqueMetadata) MetadataKind() MetadataKind

Obtain the enumerated type of a Metadata instance.

@see llvm::Metadata::getMetadataID()

llgo:link (*OpaqueMetadata).MetadataKind C.LLVMGetMetadataKind

type OpaqueModule

type OpaqueModule struct {
}

func (*OpaqueModule) AddAlias2

func (self *OpaqueModule) AddAlias2(ValueTy TypeRef, AddrSpace c.Uint, Aliasee ValueRef, Name *c.Char) ValueRef

Add a GlobalAlias with the given value type, address space and aliasee.

@see llvm::GlobalAlias::create()

llgo:link (*OpaqueModule).AddAlias2 C.LLVMAddAlias2

func (*OpaqueModule) AddFunction

func (self *OpaqueModule) AddFunction(Name *c.Char, FunctionTy TypeRef) ValueRef

Add a function to a module under a specified name.

@see llvm::Function::Create()

llgo:link (*OpaqueModule).AddFunction C.LLVMAddFunction

func (*OpaqueModule) AddGlobal

func (self *OpaqueModule) AddGlobal(Ty TypeRef, Name *c.Char) ValueRef

@defgroup LLVMCoreValueConstantGlobalVariable Global Variables

This group contains functions that operate on global variable values.

@see llvm::GlobalVariable

@{

llgo:link (*OpaqueModule).AddGlobal C.LLVMAddGlobal

func (*OpaqueModule) AddGlobalIFunc

func (self *OpaqueModule) AddGlobalIFunc(Name *c.Char, NameLen c.SizeT, Ty TypeRef, AddrSpace c.Uint, Resolver ValueRef) ValueRef

Add a global indirect function to a module under a specified name.

@see llvm::GlobalIFunc::create()

llgo:link (*OpaqueModule).AddGlobalIFunc C.LLVMAddGlobalIFunc

func (*OpaqueModule) AddGlobalInAddressSpace

func (self *OpaqueModule) AddGlobalInAddressSpace(Ty TypeRef, Name *c.Char, AddressSpace c.Uint) ValueRef

llgo:link (*OpaqueModule).AddGlobalInAddressSpace C.LLVMAddGlobalInAddressSpace

func (*OpaqueModule) AddModuleFlag

func (self *OpaqueModule) AddModuleFlag(Behavior ModuleFlagBehavior, Key *c.Char, KeyLen c.SizeT, Val MetadataRef)

Add a module-level flag to the module-level flags metadata if it doesn't already exist.

@see Module::addModuleFlag()

llgo:link (*OpaqueModule).AddModuleFlag C.LLVMAddModuleFlag

func (*OpaqueModule) AddNamedMetadataOperand

func (self *OpaqueModule) AddNamedMetadataOperand(Name *c.Char, Val ValueRef)

Add an operand to named metadata.

@see llvm::Module::getNamedMetadata() @see llvm::MDNode::addOperand()

llgo:link (*OpaqueModule).AddNamedMetadataOperand C.LLVMAddNamedMetadataOperand

func (*OpaqueModule) AppendModuleInlineAsm

func (self *OpaqueModule) AppendModuleInlineAsm(Asm *c.Char, Len c.SizeT)

Append inline assembly to a module.

@see Module::appendModuleInlineAsm()

llgo:link (*OpaqueModule).AppendModuleInlineAsm C.LLVMAppendModuleInlineAsm

func (*OpaqueModule) CloneModule

func (self *OpaqueModule) CloneModule() ModuleRef

Return an exact copy of the specified module.

llgo:link (*OpaqueModule).CloneModule C.LLVMCloneModule

func (*OpaqueModule) CopyModuleFlagsMetadata

func (self *OpaqueModule) CopyModuleFlagsMetadata(Len *c.SizeT) *ModuleFlagEntry

Returns the module flags as an array of flag-key-value triples. The caller is responsible for freeing this array by calling \c LLVMDisposeModuleFlagsMetadata.

@see Module::getModuleFlagsMetadata()

llgo:link (*OpaqueModule).CopyModuleFlagsMetadata C.LLVMCopyModuleFlagsMetadata

func (*OpaqueModule) CreateDIBuilder

func (self *OpaqueModule) CreateDIBuilder() DIBuilderRef

Construct a builder for a module and collect unresolved nodes attached to the module in order to resolve cycles during a call to \c LLVMDIBuilderFinalize.

llgo:link (*OpaqueModule).CreateDIBuilder C.LLVMCreateDIBuilder

func (*OpaqueModule) CreateDIBuilderDisallowUnresolved

func (self *OpaqueModule) CreateDIBuilderDisallowUnresolved() DIBuilderRef

Construct a builder for a module, and do not allow for unresolved nodes attached to the module.

llgo:link (*OpaqueModule).CreateDIBuilderDisallowUnresolved C.LLVMCreateDIBuilderDisallowUnresolved

func (*OpaqueModule) CreateFunctionPassManagerForModule

func (self *OpaqueModule) CreateFunctionPassManagerForModule() PassManagerRef

Constructs a new function-by-function pass pipeline over the module provider. It does not take ownership of the module provider. This type of pipeline is suitable for code generation and JIT compilation tasks. @see llvm::FunctionPassManager::FunctionPassManager

llgo:link (*OpaqueModule).CreateFunctionPassManagerForModule C.LLVMCreateFunctionPassManagerForModule

func (*OpaqueModule) CreateModuleProviderForExistingModule

func (self *OpaqueModule) CreateModuleProviderForExistingModule() ModuleProviderRef

Changes the type of M so it can be passed to FunctionPassManagers and the JIT. They take ModuleProviders for historical reasons.

llgo:link (*OpaqueModule).CreateModuleProviderForExistingModule C.LLVMCreateModuleProviderForExistingModule

func (*OpaqueModule) DataLayout

func (self *OpaqueModule) DataLayout() *c.Char

llgo:link (*OpaqueModule).DataLayout C.LLVMGetDataLayout

func (*OpaqueModule) DataLayoutStr

func (self *OpaqueModule) DataLayoutStr() *c.Char

Obtain the data layout for a module.

@see Module::getDataLayoutStr()

LLVMGetDataLayout is DEPRECATED, as the name is not only incorrect, but match the name of another method on the module. Prefer the use of LLVMGetDataLayoutStr, which is not ambiguous.

llgo:link (*OpaqueModule).DataLayoutStr C.LLVMGetDataLayoutStr

func (*OpaqueModule) DisposeModule

func (self *OpaqueModule) DisposeModule()

Destroy a module instance.

This must be called for every created module or memory will be leaked.

llgo:link (*OpaqueModule).DisposeModule C.LLVMDisposeModule

func (*OpaqueModule) DumpModule

func (self *OpaqueModule) DumpModule()

Dump a representation of a module to stderr.

@see Module::dump()

llgo:link (*OpaqueModule).DumpModule C.LLVMDumpModule

func (*OpaqueModule) FirstFunction

func (self *OpaqueModule) FirstFunction() ValueRef

Obtain an iterator to the first Function in a Module.

@see llvm::Module::begin()

llgo:link (*OpaqueModule).FirstFunction C.LLVMGetFirstFunction

func (*OpaqueModule) FirstGlobal

func (self *OpaqueModule) FirstGlobal() ValueRef

llgo:link (*OpaqueModule).FirstGlobal C.LLVMGetFirstGlobal

func (*OpaqueModule) FirstGlobalAlias

func (self *OpaqueModule) FirstGlobalAlias() ValueRef

Obtain an iterator to the first GlobalAlias in a Module.

@see llvm::Module::alias_begin()

llgo:link (*OpaqueModule).FirstGlobalAlias C.LLVMGetFirstGlobalAlias

func (*OpaqueModule) FirstGlobalIFunc

func (self *OpaqueModule) FirstGlobalIFunc() ValueRef

Obtain an iterator to the first GlobalIFunc in a Module.

@see llvm::Module::ifunc_begin()

llgo:link (*OpaqueModule).FirstGlobalIFunc C.LLVMGetFirstGlobalIFunc

func (*OpaqueModule) FirstNamedMetadata

func (self *OpaqueModule) FirstNamedMetadata() NamedMDNodeRef

Obtain an iterator to the first NamedMDNode in a Module.

@see llvm::Module::named_metadata_begin()

llgo:link (*OpaqueModule).FirstNamedMetadata C.LLVMGetFirstNamedMetadata

func (*OpaqueModule) IntrinsicCopyOverloadedName2

func (self *OpaqueModule) IntrinsicCopyOverloadedName2(ID c.Uint, ParamTypes *TypeRef, ParamCount c.SizeT, NameLength *c.SizeT) *c.Char

Copies the name of an overloaded intrinsic identified by a given list of parameter types.

Unlike LLVMIntrinsicGetName, the caller is responsible for freeing the returned string.

This version also supports unnamed types.

@see llvm::Intrinsic::getName()

llgo:link (*OpaqueModule).IntrinsicCopyOverloadedName2 C.LLVMIntrinsicCopyOverloadedName2

func (*OpaqueModule) IntrinsicDeclaration

func (self *OpaqueModule) IntrinsicDeclaration(ID c.Uint, ParamTypes *TypeRef, ParamCount c.SizeT) ValueRef

Get or insert the declaration of an intrinsic. For overloaded intrinsics, parameter types must be provided to uniquely identify an overload.

@see llvm::Intrinsic::getOrInsertDeclaration()

llgo:link (*OpaqueModule).IntrinsicDeclaration C.LLVMGetIntrinsicDeclaration

func (*OpaqueModule) IsNewDbgInfoFormat

func (self *OpaqueModule) IsNewDbgInfoFormat() Bool

Soon to be deprecated. See https://llvm.org/docs/RemoveDIsDebugInfo.html#c-api-changes

Returns true if the module is in the new debug info mode which uses non-instruction debug records instead of debug intrinsics for variable location tracking.

llgo:link (*OpaqueModule).IsNewDbgInfoFormat C.LLVMIsNewDbgInfoFormat

func (*OpaqueModule) LastFunction

func (self *OpaqueModule) LastFunction() ValueRef

Obtain an iterator to the last Function in a Module.

@see llvm::Module::end()

llgo:link (*OpaqueModule).LastFunction C.LLVMGetLastFunction

func (*OpaqueModule) LastGlobal

func (self *OpaqueModule) LastGlobal() ValueRef

llgo:link (*OpaqueModule).LastGlobal C.LLVMGetLastGlobal

func (*OpaqueModule) LastGlobalAlias

func (self *OpaqueModule) LastGlobalAlias() ValueRef

Obtain an iterator to the last GlobalAlias in a Module.

@see llvm::Module::alias_end()

llgo:link (*OpaqueModule).LastGlobalAlias C.LLVMGetLastGlobalAlias

func (*OpaqueModule) LastGlobalIFunc

func (self *OpaqueModule) LastGlobalIFunc() ValueRef

Obtain an iterator to the last GlobalIFunc in a Module.

@see llvm::Module::ifunc_end()

llgo:link (*OpaqueModule).LastGlobalIFunc C.LLVMGetLastGlobalIFunc

func (*OpaqueModule) LastNamedMetadata

func (self *OpaqueModule) LastNamedMetadata() NamedMDNodeRef

Obtain an iterator to the last NamedMDNode in a Module.

@see llvm::Module::named_metadata_end()

llgo:link (*OpaqueModule).LastNamedMetadata C.LLVMGetLastNamedMetadata

func (*OpaqueModule) ModuleContext

func (self *OpaqueModule) ModuleContext() ContextRef

Obtain the context to which this module is associated.

@see Module::getContext()

llgo:link (*OpaqueModule).ModuleContext C.LLVMGetModuleContext

func (*OpaqueModule) ModuleDataLayout

func (self *OpaqueModule) ModuleDataLayout() TargetDataRef

Obtain the data layout for a module.

@see Module::getDataLayout()

llgo:link (*OpaqueModule).ModuleDataLayout C.LLVMGetModuleDataLayout

func (*OpaqueModule) ModuleDebugMetadataVersion

func (self *OpaqueModule) ModuleDebugMetadataVersion() c.Uint

The version of debug metadata that's present in the provided \c Module.

llgo:link (*OpaqueModule).ModuleDebugMetadataVersion C.LLVMGetModuleDebugMetadataVersion

func (*OpaqueModule) ModuleFlag

func (self *OpaqueModule) ModuleFlag(Key *c.Char, KeyLen c.SizeT) MetadataRef

Add a module-level flag to the module-level flags metadata if it doesn't already exist.

@see Module::getModuleFlag()

llgo:link (*OpaqueModule).ModuleFlag C.LLVMGetModuleFlag

func (*OpaqueModule) ModuleIdentifier

func (self *OpaqueModule) ModuleIdentifier(Len *c.SizeT) *c.Char

Obtain the identifier of a module.

@param M Module to obtain identifier of @param Len Out parameter which holds the length of the returned string. @return The identifier of M. @see Module::getModuleIdentifier()

llgo:link (*OpaqueModule).ModuleIdentifier C.LLVMGetModuleIdentifier

func (*OpaqueModule) ModuleInlineAsm

func (self *OpaqueModule) ModuleInlineAsm(Len *c.SizeT) *c.Char

Get inline assembly for a module.

@see Module::getModuleInlineAsm()

llgo:link (*OpaqueModule).ModuleInlineAsm C.LLVMGetModuleInlineAsm

func (*OpaqueModule) NamedFunction

func (self *OpaqueModule) NamedFunction(Name *c.Char) ValueRef

Obtain a Function value from a Module by its name.

The returned value corresponds to a llvm::Function value.

@see llvm::Module::getFunction()

llgo:link (*OpaqueModule).NamedFunction C.LLVMGetNamedFunction

func (*OpaqueModule) NamedFunctionWithLength

func (self *OpaqueModule) NamedFunctionWithLength(Name *c.Char, Length c.SizeT) ValueRef

Obtain a Function value from a Module by its name.

The returned value corresponds to a llvm::Function value.

@see llvm::Module::getFunction()

llgo:link (*OpaqueModule).NamedFunctionWithLength C.LLVMGetNamedFunctionWithLength

func (*OpaqueModule) NamedGlobal

func (self *OpaqueModule) NamedGlobal(Name *c.Char) ValueRef

llgo:link (*OpaqueModule).NamedGlobal C.LLVMGetNamedGlobal

func (*OpaqueModule) NamedGlobalAlias

func (self *OpaqueModule) NamedGlobalAlias(Name *c.Char, NameLen c.SizeT) ValueRef

Obtain a GlobalAlias value from a Module by its name.

The returned value corresponds to a llvm::GlobalAlias value.

@see llvm::Module::getNamedAlias()

llgo:link (*OpaqueModule).NamedGlobalAlias C.LLVMGetNamedGlobalAlias

func (*OpaqueModule) NamedGlobalIFunc

func (self *OpaqueModule) NamedGlobalIFunc(Name *c.Char, NameLen c.SizeT) ValueRef

Obtain a GlobalIFunc value from a Module by its name.

The returned value corresponds to a llvm::GlobalIFunc value.

@see llvm::Module::getNamedIFunc()

llgo:link (*OpaqueModule).NamedGlobalIFunc C.LLVMGetNamedGlobalIFunc

func (*OpaqueModule) NamedGlobalWithLength

func (self *OpaqueModule) NamedGlobalWithLength(Name *c.Char, Length c.SizeT) ValueRef

llgo:link (*OpaqueModule).NamedGlobalWithLength C.LLVMGetNamedGlobalWithLength

func (*OpaqueModule) NamedMetadata

func (self *OpaqueModule) NamedMetadata(Name *c.Char, NameLen c.SizeT) NamedMDNodeRef

Retrieve a NamedMDNode with the given name, returning NULL if no such node exists.

@see llvm::Module::getNamedMetadata()

llgo:link (*OpaqueModule).NamedMetadata C.LLVMGetNamedMetadata

func (*OpaqueModule) NamedMetadataNumOperands

func (self *OpaqueModule) NamedMetadataNumOperands(Name *c.Char) c.Uint

Obtain the number of operands for named metadata in a module.

@see llvm::Module::getNamedMetadata()

llgo:link (*OpaqueModule).NamedMetadataNumOperands C.LLVMGetNamedMetadataNumOperands

func (*OpaqueModule) NamedMetadataOperands

func (self *OpaqueModule) NamedMetadataOperands(Name *c.Char, Dest *ValueRef)

Obtain the named metadata operands for a module.

The passed LLVMValueRef pointer should refer to an array of LLVMValueRef at least LLVMGetNamedMetadataNumOperands long. This array will be populated with the LLVMValueRef instances. Each instance corresponds to a llvm::MDNode.

@see llvm::Module::getNamedMetadata() @see llvm::MDNode::getOperand()

llgo:link (*OpaqueModule).NamedMetadataOperands C.LLVMGetNamedMetadataOperands

func (*OpaqueModule) OrInsertComdat

func (self *OpaqueModule) OrInsertComdat(Name *c.Char) ComdatRef

Return the Comdat in the module with the specified name. It is created if it didn't already exist.

@see llvm::Module::getOrInsertComdat()

llgo:link (*OpaqueModule).OrInsertComdat C.LLVMGetOrInsertComdat

func (*OpaqueModule) OrInsertFunction

func (self *OpaqueModule) OrInsertFunction(Name *c.Char, NameLen c.SizeT, FunctionTy TypeRef) ValueRef

Obtain or insert a function into a module.

If a function with the specified name already exists in the module, it is returned. Otherwise, a new function is created in the module with the specified name and type and is returned.

The returned value corresponds to a llvm::Function instance.

@see llvm::Module::getOrInsertFunction()

llgo:link (*OpaqueModule).OrInsertFunction C.LLVMGetOrInsertFunction

func (*OpaqueModule) OrInsertNamedMetadata

func (self *OpaqueModule) OrInsertNamedMetadata(Name *c.Char, NameLen c.SizeT) NamedMDNodeRef

Retrieve a NamedMDNode with the given name, creating a new node if no such node exists.

@see llvm::Module::getOrInsertNamedMetadata()

llgo:link (*OpaqueModule).OrInsertNamedMetadata C.LLVMGetOrInsertNamedMetadata

func (*OpaqueModule) OrcCreateNewThreadSafeModule

func (self *OpaqueModule) OrcCreateNewThreadSafeModule(TSCtx OrcThreadSafeContextRef) OrcThreadSafeModuleRef

Create a ThreadSafeModule wrapper around the given LLVM module. This takes ownership of the M argument which should not be disposed of or referenced after this function returns.

Ownership of the ThreadSafeModule is unique: If it is transferred to the JIT (e.g. by LLVMOrcLLJITAddLLVMIRModule) then the client is no longer responsible for it. If it is not transferred to the JIT then the client should call LLVMOrcDisposeThreadSafeModule to dispose of it.

llgo:link (*OpaqueModule).OrcCreateNewThreadSafeModule C.LLVMOrcCreateNewThreadSafeModule

func (*OpaqueModule) PrintModuleToFile

func (self *OpaqueModule) PrintModuleToFile(Filename *c.Char, ErrorMessage **c.Char) Bool

Print a representation of a module to a file. The ErrorMessage needs to be disposed with LLVMDisposeMessage. Returns 0 on success, 1 otherwise.

@see Module::print()

llgo:link (*OpaqueModule).PrintModuleToFile C.LLVMPrintModuleToFile

func (*OpaqueModule) PrintModuleToString

func (self *OpaqueModule) PrintModuleToString() *c.Char

Return a string representation of the module. Use LLVMDisposeMessage to free the string.

@see Module::print()

llgo:link (*OpaqueModule).PrintModuleToString C.LLVMPrintModuleToString

func (*OpaqueModule) RunPasses added in v0.2.0

func (self *OpaqueModule) RunPasses(Passes *c.Char, TM TargetMachineRef, Options PassBuilderOptionsRef) ErrorRef

Construct and run a set of passes over a module

This function takes a string with the passes that should be used. The format of this string is the same as opt's -passes argument for the new pass manager. Individual passes may be specified, separated by commas. Full pipelines may also be invoked using `default<O3>` and friends. See opt for full reference of the Passes format.

llgo:link (*OpaqueModule).RunPasses C.LLVMRunPasses

func (*OpaqueModule) SetDataLayout

func (self *OpaqueModule) SetDataLayout(DataLayoutStr *c.Char)

Set the data layout for a module.

@see Module::setDataLayout()

llgo:link (*OpaqueModule).SetDataLayout C.LLVMSetDataLayout

func (*OpaqueModule) SetIsNewDbgInfoFormat

func (self *OpaqueModule) SetIsNewDbgInfoFormat(UseNewFormat Bool)

Soon to be deprecated. See https://llvm.org/docs/RemoveDIsDebugInfo.html#c-api-changes

Convert module into desired debug info format.

llgo:link (*OpaqueModule).SetIsNewDbgInfoFormat C.LLVMSetIsNewDbgInfoFormat

func (*OpaqueModule) SetModuleDataLayout

func (self *OpaqueModule) SetModuleDataLayout(DL TargetDataRef)

Set the data layout for a module.

@see Module::setDataLayout()

llgo:link (*OpaqueModule).SetModuleDataLayout C.LLVMSetModuleDataLayout

func (*OpaqueModule) SetModuleIdentifier

func (self *OpaqueModule) SetModuleIdentifier(Ident *c.Char, Len c.SizeT)

Set the identifier of a module to a string Ident with length Len.

@param M The module to set identifier @param Ident The string to set M's identifier to @param Len Length of Ident @see Module::setModuleIdentifier()

llgo:link (*OpaqueModule).SetModuleIdentifier C.LLVMSetModuleIdentifier

func (*OpaqueModule) SetModuleInlineAsm deprecated

func (self *OpaqueModule) SetModuleInlineAsm(Asm *c.Char)

Deprecated: Use LLVMSetModuleInlineAsm2 instead.

llgo:link (*OpaqueModule).SetModuleInlineAsm C.LLVMSetModuleInlineAsm

func (*OpaqueModule) SetModuleInlineAsm2

func (self *OpaqueModule) SetModuleInlineAsm2(Asm *c.Char, Len c.SizeT)

Set inline assembly for a module.

@see Module::setModuleInlineAsm()

llgo:link (*OpaqueModule).SetModuleInlineAsm2 C.LLVMSetModuleInlineAsm2

func (*OpaqueModule) SetSourceFileName

func (self *OpaqueModule) SetSourceFileName(Name *c.Char, Len c.SizeT)

Set the original source file name of a module to a string Name with length Len.

@param M The module to set the source file name of @param Name The string to set M's source file name to @param Len Length of Name @see Module::setSourceFileName()

llgo:link (*OpaqueModule).SetSourceFileName C.LLVMSetSourceFileName

func (*OpaqueModule) SetTarget

func (self *OpaqueModule) SetTarget(Triple *c.Char)

Set the target triple for a module.

@see Module::setTargetTriple()

llgo:link (*OpaqueModule).SetTarget C.LLVMSetTarget

func (*OpaqueModule) SourceFileName

func (self *OpaqueModule) SourceFileName(Len *c.SizeT) *c.Char

Obtain the module's original source file name.

@param M Module to obtain the name of @param Len Out parameter which holds the length of the returned string @return The original source file name of M @see Module::getSourceFileName()

llgo:link (*OpaqueModule).SourceFileName C.LLVMGetSourceFileName

func (*OpaqueModule) StripModuleDebugInfo

func (self *OpaqueModule) StripModuleDebugInfo() Bool

Strip debug info in the module if it exists. To do this, we remove all calls to the debugger intrinsics and any named metadata for debugging. We also remove debug locations for instructions. Return true if module is modified.

llgo:link (*OpaqueModule).StripModuleDebugInfo C.LLVMStripModuleDebugInfo

func (*OpaqueModule) Target

func (self *OpaqueModule) Target() *c.Char

Obtain the target triple for a module.

@see Module::getTargetTriple()

llgo:link (*OpaqueModule).Target C.LLVMGetTarget

func (*OpaqueModule) TypeByName deprecated

func (self *OpaqueModule) TypeByName(Name *c.Char) TypeRef

Deprecated: Use LLVMGetTypeByName2 instead.

llgo:link (*OpaqueModule).TypeByName C.LLVMGetTypeByName

func (*OpaqueModule) VerifyModule

func (self *OpaqueModule) VerifyModule(Action VerifierFailureAction, OutMessage **c.Char) Bool

llgo:link (*OpaqueModule).VerifyModule C.LLVMVerifyModule

func (*OpaqueModule) WriteBitcodeToFD

func (self *OpaqueModule) WriteBitcodeToFD(FD c.Int, ShouldClose c.Int, Unbuffered c.Int) c.Int

Writes a module to an open file descriptor. Returns 0 on success.

llgo:link (*OpaqueModule).WriteBitcodeToFD C.LLVMWriteBitcodeToFD

func (*OpaqueModule) WriteBitcodeToFile

func (self *OpaqueModule) WriteBitcodeToFile(Path *c.Char) c.Int

Writes a module to the specified path. Returns 0 on success.

llgo:link (*OpaqueModule).WriteBitcodeToFile C.LLVMWriteBitcodeToFile

func (*OpaqueModule) WriteBitcodeToFileHandle

func (self *OpaqueModule) WriteBitcodeToFileHandle(Handle c.Int) c.Int

Deprecated for LLVMWriteBitcodeToFD. Writes a module to an open file descriptor. Returns 0 on success. Closes the Handle.

llgo:link (*OpaqueModule).WriteBitcodeToFileHandle C.LLVMWriteBitcodeToFileHandle

func (*OpaqueModule) WriteBitcodeToMemoryBuffer

func (self *OpaqueModule) WriteBitcodeToMemoryBuffer() MemoryBufferRef

Writes a module to a new memory buffer and returns it.

llgo:link (*OpaqueModule).WriteBitcodeToMemoryBuffer C.LLVMWriteBitcodeToMemoryBuffer

type OpaqueModuleFlagEntry

type OpaqueModuleFlagEntry struct {
}

func (OpaqueModuleFlagEntry) DisposeModuleFlagsMetadata

func (self OpaqueModuleFlagEntry) DisposeModuleFlagsMetadata()

Destroys module flags metadata entries.

llgo:link OpaqueModuleFlagEntry.DisposeModuleFlagsMetadata C.LLVMDisposeModuleFlagsMetadata

func (OpaqueModuleFlagEntry) ModuleFlagEntriesGetFlagBehavior

func (self OpaqueModuleFlagEntry) ModuleFlagEntriesGetFlagBehavior(Index c.Uint) ModuleFlagBehavior

Returns the flag behavior for a module flag entry at a specific index.

@see Module::ModuleFlagEntry::Behavior

llgo:link OpaqueModuleFlagEntry.ModuleFlagEntriesGetFlagBehavior C.LLVMModuleFlagEntriesGetFlagBehavior

func (OpaqueModuleFlagEntry) ModuleFlagEntriesGetKey

func (self OpaqueModuleFlagEntry) ModuleFlagEntriesGetKey(Index c.Uint, Len *c.SizeT) *c.Char

Returns the key for a module flag entry at a specific index.

@see Module::ModuleFlagEntry::Key

llgo:link OpaqueModuleFlagEntry.ModuleFlagEntriesGetKey C.LLVMModuleFlagEntriesGetKey

func (OpaqueModuleFlagEntry) ModuleFlagEntriesGetMetadata

func (self OpaqueModuleFlagEntry) ModuleFlagEntriesGetMetadata(Index c.Uint) MetadataRef

Returns the metadata for a module flag entry at a specific index.

@see Module::ModuleFlagEntry::Val

llgo:link OpaqueModuleFlagEntry.ModuleFlagEntriesGetMetadata C.LLVMModuleFlagEntriesGetMetadata

type OpaqueModuleProvider

type OpaqueModuleProvider struct {
}

func (*OpaqueModuleProvider) CreateFunctionPassManager deprecated

func (self *OpaqueModuleProvider) CreateFunctionPassManager() PassManagerRef

Deprecated: Use LLVMCreateFunctionPassManagerForModule instead.

llgo:link (*OpaqueModuleProvider).CreateFunctionPassManager C.LLVMCreateFunctionPassManager

func (*OpaqueModuleProvider) DisposeModuleProvider

func (self *OpaqueModuleProvider) DisposeModuleProvider()

Destroys the module M.

llgo:link (*OpaqueModuleProvider).DisposeModuleProvider C.LLVMDisposeModuleProvider

type OpaqueNamedMDNode

type OpaqueNamedMDNode struct {
}

func (*OpaqueNamedMDNode) NamedMetadataName

func (self *OpaqueNamedMDNode) NamedMetadataName(NameLen *c.SizeT) *c.Char

Retrieve the name of a NamedMDNode.

@see llvm::NamedMDNode::getName()

llgo:link (*OpaqueNamedMDNode).NamedMetadataName C.LLVMGetNamedMetadataName

func (*OpaqueNamedMDNode) NextNamedMetadata

func (self *OpaqueNamedMDNode) NextNamedMetadata() NamedMDNodeRef

Advance a NamedMDNode iterator to the next NamedMDNode.

Returns NULL if the iterator was already at the end and there are no more named metadata nodes.

llgo:link (*OpaqueNamedMDNode).NextNamedMetadata C.LLVMGetNextNamedMetadata

func (*OpaqueNamedMDNode) PreviousNamedMetadata

func (self *OpaqueNamedMDNode) PreviousNamedMetadata() NamedMDNodeRef

Decrement a NamedMDNode iterator to the previous NamedMDNode.

Returns NULL if the iterator was already at the beginning and there are no previous named metadata nodes.

llgo:link (*OpaqueNamedMDNode).PreviousNamedMetadata C.LLVMGetPreviousNamedMetadata

type OpaqueObjectFile

type OpaqueObjectFile struct {
}

func (*OpaqueObjectFile) DisposeObjectFile deprecated

func (self *OpaqueObjectFile) DisposeObjectFile()

Deprecated: Use LLVMDisposeBinary instead.

llgo:link (*OpaqueObjectFile).DisposeObjectFile C.LLVMDisposeObjectFile

func (*OpaqueObjectFile) IsSectionIteratorAtEnd deprecated

func (self *OpaqueObjectFile) IsSectionIteratorAtEnd(SI SectionIteratorRef) Bool

Deprecated: Use LLVMObjectFileIsSectionIteratorAtEnd instead.

llgo:link (*OpaqueObjectFile).IsSectionIteratorAtEnd C.LLVMIsSectionIteratorAtEnd

func (*OpaqueObjectFile) IsSymbolIteratorAtEnd deprecated

func (self *OpaqueObjectFile) IsSymbolIteratorAtEnd(SI SymbolIteratorRef) Bool

Deprecated: Use LLVMObjectFileIsSymbolIteratorAtEnd instead.

llgo:link (*OpaqueObjectFile).IsSymbolIteratorAtEnd C.LLVMIsSymbolIteratorAtEnd

func (*OpaqueObjectFile) Sections deprecated

func (self *OpaqueObjectFile) Sections() SectionIteratorRef

Deprecated: Use LLVMObjectFileCopySectionIterator instead.

llgo:link (*OpaqueObjectFile).Sections C.LLVMGetSections

func (*OpaqueObjectFile) Symbols deprecated

func (self *OpaqueObjectFile) Symbols() SymbolIteratorRef

Deprecated: Use LLVMObjectFileCopySymbolIterator instead.

llgo:link (*OpaqueObjectFile).Symbols C.LLVMGetSymbols

type OpaqueOperandBundle

type OpaqueOperandBundle struct {
}

func (*OpaqueOperandBundle) DisposeOperandBundle

func (self *OpaqueOperandBundle) DisposeOperandBundle()

Destroy an operand bundle.

This must be called for every created operand bundle or memory will be leaked.

llgo:link (*OpaqueOperandBundle).DisposeOperandBundle C.LLVMDisposeOperandBundle

func (*OpaqueOperandBundle) NumOperandBundleArgs

func (self *OpaqueOperandBundle) NumOperandBundleArgs() c.Uint

Obtain the number of operands for an operand bundle.

@param Bundle Operand bundle to obtain operand count of. @return The number of operands. @see OperandBundleDef::input_size()

llgo:link (*OpaqueOperandBundle).NumOperandBundleArgs C.LLVMGetNumOperandBundleArgs

func (*OpaqueOperandBundle) OperandBundleArgAtIndex

func (self *OpaqueOperandBundle) OperandBundleArgAtIndex(Index c.Uint) ValueRef

Obtain the operand for an operand bundle at the given index.

@param Bundle Operand bundle to obtain operand of. @param Index An operand index, must be less than LLVMGetNumOperandBundleArgs(). @return The operand.

llgo:link (*OpaqueOperandBundle).OperandBundleArgAtIndex C.LLVMGetOperandBundleArgAtIndex

func (*OpaqueOperandBundle) OperandBundleTag

func (self *OpaqueOperandBundle) OperandBundleTag(Len *c.SizeT) *c.Char

Obtain the tag of an operand bundle as a string.

@param Bundle Operand bundle to obtain tag of. @param Len Out parameter which holds the length of the returned string. @return The tag name of Bundle. @see OperandBundleDef::getTag()

llgo:link (*OpaqueOperandBundle).OperandBundleTag C.LLVMGetOperandBundleTag

type OpaquePassBuilderOptions added in v0.2.0

type OpaquePassBuilderOptions struct {
}

func (*OpaquePassBuilderOptions) DisposePassBuilderOptions added in v0.2.0

func (self *OpaquePassBuilderOptions) DisposePassBuilderOptions()

Dispose of a heap-allocated PassBuilderOptions instance

llgo:link (*OpaquePassBuilderOptions).DisposePassBuilderOptions C.LLVMDisposePassBuilderOptions

func (*OpaquePassBuilderOptions) PassBuilderOptionsSetAAPipeline added in v0.2.0

func (self *OpaquePassBuilderOptions) PassBuilderOptionsSetAAPipeline(AAPipeline *c.Char)

Specify a custom alias analysis pipeline for the PassBuilder to be used instead of the default one. The string argument is not copied; the caller is responsible for ensuring it outlives the PassBuilderOptions instance.

llgo:link (*OpaquePassBuilderOptions).PassBuilderOptionsSetAAPipeline C.LLVMPassBuilderOptionsSetAAPipeline

func (*OpaquePassBuilderOptions) PassBuilderOptionsSetCallGraphProfile added in v0.2.0

func (self *OpaquePassBuilderOptions) PassBuilderOptionsSetCallGraphProfile(CallGraphProfile Bool)

llgo:link (*OpaquePassBuilderOptions).PassBuilderOptionsSetCallGraphProfile C.LLVMPassBuilderOptionsSetCallGraphProfile

func (*OpaquePassBuilderOptions) PassBuilderOptionsSetDebugLogging added in v0.2.0

func (self *OpaquePassBuilderOptions) PassBuilderOptionsSetDebugLogging(DebugLogging Bool)

Toggle debug logging when running the PassBuilder

llgo:link (*OpaquePassBuilderOptions).PassBuilderOptionsSetDebugLogging C.LLVMPassBuilderOptionsSetDebugLogging

func (*OpaquePassBuilderOptions) PassBuilderOptionsSetForgetAllSCEVInLoopUnroll added in v0.2.0

func (self *OpaquePassBuilderOptions) PassBuilderOptionsSetForgetAllSCEVInLoopUnroll(ForgetAllSCEVInLoopUnroll Bool)

llgo:link (*OpaquePassBuilderOptions).PassBuilderOptionsSetForgetAllSCEVInLoopUnroll C.LLVMPassBuilderOptionsSetForgetAllSCEVInLoopUnroll

func (*OpaquePassBuilderOptions) PassBuilderOptionsSetInlinerThreshold added in v0.2.0

func (self *OpaquePassBuilderOptions) PassBuilderOptionsSetInlinerThreshold(Threshold c.Int)

llgo:link (*OpaquePassBuilderOptions).PassBuilderOptionsSetInlinerThreshold C.LLVMPassBuilderOptionsSetInlinerThreshold

func (*OpaquePassBuilderOptions) PassBuilderOptionsSetLicmMssaNoAccForPromotionCap added in v0.2.0

func (self *OpaquePassBuilderOptions) PassBuilderOptionsSetLicmMssaNoAccForPromotionCap(LicmMssaNoAccForPromotionCap c.Uint)

llgo:link (*OpaquePassBuilderOptions).PassBuilderOptionsSetLicmMssaNoAccForPromotionCap C.LLVMPassBuilderOptionsSetLicmMssaNoAccForPromotionCap

func (*OpaquePassBuilderOptions) PassBuilderOptionsSetLicmMssaOptCap added in v0.2.0

func (self *OpaquePassBuilderOptions) PassBuilderOptionsSetLicmMssaOptCap(LicmMssaOptCap c.Uint)

llgo:link (*OpaquePassBuilderOptions).PassBuilderOptionsSetLicmMssaOptCap C.LLVMPassBuilderOptionsSetLicmMssaOptCap

func (*OpaquePassBuilderOptions) PassBuilderOptionsSetLoopInterleaving added in v0.2.0

func (self *OpaquePassBuilderOptions) PassBuilderOptionsSetLoopInterleaving(LoopInterleaving Bool)

llgo:link (*OpaquePassBuilderOptions).PassBuilderOptionsSetLoopInterleaving C.LLVMPassBuilderOptionsSetLoopInterleaving

func (*OpaquePassBuilderOptions) PassBuilderOptionsSetLoopUnrolling added in v0.2.0

func (self *OpaquePassBuilderOptions) PassBuilderOptionsSetLoopUnrolling(LoopUnrolling Bool)

llgo:link (*OpaquePassBuilderOptions).PassBuilderOptionsSetLoopUnrolling C.LLVMPassBuilderOptionsSetLoopUnrolling

func (*OpaquePassBuilderOptions) PassBuilderOptionsSetLoopVectorization added in v0.2.0

func (self *OpaquePassBuilderOptions) PassBuilderOptionsSetLoopVectorization(LoopVectorization Bool)

llgo:link (*OpaquePassBuilderOptions).PassBuilderOptionsSetLoopVectorization C.LLVMPassBuilderOptionsSetLoopVectorization

func (*OpaquePassBuilderOptions) PassBuilderOptionsSetMergeFunctions added in v0.2.0

func (self *OpaquePassBuilderOptions) PassBuilderOptionsSetMergeFunctions(MergeFunctions Bool)

llgo:link (*OpaquePassBuilderOptions).PassBuilderOptionsSetMergeFunctions C.LLVMPassBuilderOptionsSetMergeFunctions

func (*OpaquePassBuilderOptions) PassBuilderOptionsSetSLPVectorization added in v0.2.0

func (self *OpaquePassBuilderOptions) PassBuilderOptionsSetSLPVectorization(SLPVectorization Bool)

llgo:link (*OpaquePassBuilderOptions).PassBuilderOptionsSetSLPVectorization C.LLVMPassBuilderOptionsSetSLPVectorization

func (*OpaquePassBuilderOptions) PassBuilderOptionsSetVerifyEach added in v0.2.0

func (self *OpaquePassBuilderOptions) PassBuilderOptionsSetVerifyEach(VerifyEach Bool)

Toggle adding the VerifierPass for the PassBuilder, ensuring all functions inside the module is valid.

llgo:link (*OpaquePassBuilderOptions).PassBuilderOptionsSetVerifyEach C.LLVMPassBuilderOptionsSetVerifyEach

type OpaquePassManager

type OpaquePassManager struct {
}

func (*OpaquePassManager) DisposePassManager

func (self *OpaquePassManager) DisposePassManager()

Frees the memory of a pass pipeline. For function pipelines, does not free the module provider. @see llvm::PassManagerBase::~PassManagerBase.

llgo:link (*OpaquePassManager).DisposePassManager C.LLVMDisposePassManager

func (*OpaquePassManager) FinalizeFunctionPassManager

func (self *OpaquePassManager) FinalizeFunctionPassManager() Bool

Finalizes all of the function passes scheduled in the function pass manager. Returns 1 if any of the passes modified the module, 0 otherwise. @see llvm::FunctionPassManager::doFinalization

llgo:link (*OpaquePassManager).FinalizeFunctionPassManager C.LLVMFinalizeFunctionPassManager

func (*OpaquePassManager) InitializeFunctionPassManager

func (self *OpaquePassManager) InitializeFunctionPassManager() Bool

Initializes all of the function passes scheduled in the function pass manager. Returns 1 if any of the passes modified the module, 0 otherwise. @see llvm::FunctionPassManager::doInitialization

llgo:link (*OpaquePassManager).InitializeFunctionPassManager C.LLVMInitializeFunctionPassManager

func (*OpaquePassManager) RunFunctionPassManager

func (self *OpaquePassManager) RunFunctionPassManager(F ValueRef) Bool

Executes all of the function passes scheduled in the function pass manager on the provided function. Returns 1 if any of the passes modified the function, false otherwise. @see llvm::FunctionPassManager::run(Function&)

llgo:link (*OpaquePassManager).RunFunctionPassManager C.LLVMRunFunctionPassManager

func (*OpaquePassManager) RunPassManager

func (self *OpaquePassManager) RunPassManager(M ModuleRef) Bool

Initializes, executes on the provided module, and finalizes all of the passes scheduled in the pass manager. Returns 1 if any of the passes modified the module, 0 otherwise. @see llvm::PassManager::run(Module&)

llgo:link (*OpaquePassManager).RunPassManager C.LLVMRunPassManager

type OpaqueRelocationIterator

type OpaqueRelocationIterator struct {
}

func (*OpaqueRelocationIterator) DisposeRelocationIterator

func (self *OpaqueRelocationIterator) DisposeRelocationIterator()

llgo:link (*OpaqueRelocationIterator).DisposeRelocationIterator C.LLVMDisposeRelocationIterator

func (*OpaqueRelocationIterator) MoveToNextRelocation

func (self *OpaqueRelocationIterator) MoveToNextRelocation()

llgo:link (*OpaqueRelocationIterator).MoveToNextRelocation C.LLVMMoveToNextRelocation

func (*OpaqueRelocationIterator) RelocationOffset

func (self *OpaqueRelocationIterator) RelocationOffset() c.Uint64T

llgo:link (*OpaqueRelocationIterator).RelocationOffset C.LLVMGetRelocationOffset

func (*OpaqueRelocationIterator) RelocationSymbol

func (self *OpaqueRelocationIterator) RelocationSymbol() SymbolIteratorRef

llgo:link (*OpaqueRelocationIterator).RelocationSymbol C.LLVMGetRelocationSymbol

func (*OpaqueRelocationIterator) RelocationType

func (self *OpaqueRelocationIterator) RelocationType() c.Uint64T

llgo:link (*OpaqueRelocationIterator).RelocationType C.LLVMGetRelocationType

func (*OpaqueRelocationIterator) RelocationTypeName

func (self *OpaqueRelocationIterator) RelocationTypeName() *c.Char

llgo:link (*OpaqueRelocationIterator).RelocationTypeName C.LLVMGetRelocationTypeName

func (*OpaqueRelocationIterator) RelocationValueString

func (self *OpaqueRelocationIterator) RelocationValueString() *c.Char

llgo:link (*OpaqueRelocationIterator).RelocationValueString C.LLVMGetRelocationValueString

type OpaqueSectionIterator

type OpaqueSectionIterator struct {
}

func (*OpaqueSectionIterator) DisposeSectionIterator

func (self *OpaqueSectionIterator) DisposeSectionIterator()

llgo:link (*OpaqueSectionIterator).DisposeSectionIterator C.LLVMDisposeSectionIterator

func (*OpaqueSectionIterator) IsRelocationIteratorAtEnd

func (self *OpaqueSectionIterator) IsRelocationIteratorAtEnd(RI RelocationIteratorRef) Bool

llgo:link (*OpaqueSectionIterator).IsRelocationIteratorAtEnd C.LLVMIsRelocationIteratorAtEnd

func (*OpaqueSectionIterator) MoveToContainingSection

func (self *OpaqueSectionIterator) MoveToContainingSection(Sym SymbolIteratorRef)

llgo:link (*OpaqueSectionIterator).MoveToContainingSection C.LLVMMoveToContainingSection

func (*OpaqueSectionIterator) MoveToNextSection

func (self *OpaqueSectionIterator) MoveToNextSection()

llgo:link (*OpaqueSectionIterator).MoveToNextSection C.LLVMMoveToNextSection

func (*OpaqueSectionIterator) Relocations

func (self *OpaqueSectionIterator) Relocations() RelocationIteratorRef

llgo:link (*OpaqueSectionIterator).Relocations C.LLVMGetRelocations

func (*OpaqueSectionIterator) SectionAddress

func (self *OpaqueSectionIterator) SectionAddress() c.Uint64T

llgo:link (*OpaqueSectionIterator).SectionAddress C.LLVMGetSectionAddress

func (*OpaqueSectionIterator) SectionContainsSymbol

func (self *OpaqueSectionIterator) SectionContainsSymbol(Sym SymbolIteratorRef) Bool

llgo:link (*OpaqueSectionIterator).SectionContainsSymbol C.LLVMGetSectionContainsSymbol

func (*OpaqueSectionIterator) SectionContents

func (self *OpaqueSectionIterator) SectionContents() *c.Char

llgo:link (*OpaqueSectionIterator).SectionContents C.LLVMGetSectionContents

func (*OpaqueSectionIterator) SectionName

func (self *OpaqueSectionIterator) SectionName() *c.Char

llgo:link (*OpaqueSectionIterator).SectionName C.LLVMGetSectionName

func (*OpaqueSectionIterator) SectionSize

func (self *OpaqueSectionIterator) SectionSize() c.Uint64T

llgo:link (*OpaqueSectionIterator).SectionSize C.LLVMGetSectionSize

type OpaqueSymbolIterator

type OpaqueSymbolIterator struct {
}

func (*OpaqueSymbolIterator) DisposeSymbolIterator

func (self *OpaqueSymbolIterator) DisposeSymbolIterator()

llgo:link (*OpaqueSymbolIterator).DisposeSymbolIterator C.LLVMDisposeSymbolIterator

func (*OpaqueSymbolIterator) MoveToNextSymbol

func (self *OpaqueSymbolIterator) MoveToNextSymbol()

llgo:link (*OpaqueSymbolIterator).MoveToNextSymbol C.LLVMMoveToNextSymbol

func (*OpaqueSymbolIterator) SymbolAddress

func (self *OpaqueSymbolIterator) SymbolAddress() c.Uint64T

llgo:link (*OpaqueSymbolIterator).SymbolAddress C.LLVMGetSymbolAddress

func (*OpaqueSymbolIterator) SymbolName

func (self *OpaqueSymbolIterator) SymbolName() *c.Char

llgo:link (*OpaqueSymbolIterator).SymbolName C.LLVMGetSymbolName

func (*OpaqueSymbolIterator) SymbolSize

func (self *OpaqueSymbolIterator) SymbolSize() c.Uint64T

llgo:link (*OpaqueSymbolIterator).SymbolSize C.LLVMGetSymbolSize

type OpaqueTargetData

type OpaqueTargetData struct {
}

func (*OpaqueTargetData) ABIAlignmentOfType

func (self *OpaqueTargetData) ABIAlignmentOfType(Ty TypeRef) c.Uint

Computes the ABI alignment of a type in bytes for a target. See the method llvm::DataLayout::getTypeABISize.

llgo:link (*OpaqueTargetData).ABIAlignmentOfType C.LLVMABIAlignmentOfType

func (*OpaqueTargetData) ABISizeOfType

func (self *OpaqueTargetData) ABISizeOfType(Ty TypeRef) c.UlongLong

Computes the ABI size of a type in bytes for a target. See the method llvm::DataLayout::getTypeAllocSize.

llgo:link (*OpaqueTargetData).ABISizeOfType C.LLVMABISizeOfType

func (*OpaqueTargetData) ByteOrder

func (self *OpaqueTargetData) ByteOrder() ByteOrdering

Returns the byte order of a target, either LLVMBigEndian or LLVMLittleEndian. See the method llvm::DataLayout::isLittleEndian.

llgo:link (*OpaqueTargetData).ByteOrder C.LLVMByteOrder

func (*OpaqueTargetData) CallFrameAlignmentOfType

func (self *OpaqueTargetData) CallFrameAlignmentOfType(Ty TypeRef) c.Uint

Computes the call frame alignment of a type in bytes for a target. See the method llvm::DataLayout::getTypeABISize.

llgo:link (*OpaqueTargetData).CallFrameAlignmentOfType C.LLVMCallFrameAlignmentOfType

func (*OpaqueTargetData) CopyStringRepOfTargetData

func (self *OpaqueTargetData) CopyStringRepOfTargetData() *c.Char

Converts target data to a target layout string. The string must be disposed with LLVMDisposeMessage. See the constructor llvm::DataLayout::DataLayout.

llgo:link (*OpaqueTargetData).CopyStringRepOfTargetData C.LLVMCopyStringRepOfTargetData

func (*OpaqueTargetData) DisposeTargetData

func (self *OpaqueTargetData) DisposeTargetData()

Deallocates a TargetData. See the destructor llvm::DataLayout::~DataLayout.

llgo:link (*OpaqueTargetData).DisposeTargetData C.LLVMDisposeTargetData

func (*OpaqueTargetData) ElementAtOffset

func (self *OpaqueTargetData) ElementAtOffset(StructTy TypeRef, Offset c.UlongLong) c.Uint

Computes the structure element that contains the byte offset for a target. See the method llvm::StructLayout::getElementContainingOffset.

llgo:link (*OpaqueTargetData).ElementAtOffset C.LLVMElementAtOffset

func (*OpaqueTargetData) IntPtrType

func (self *OpaqueTargetData) IntPtrType() TypeRef

Returns the integer type that is the same size as a pointer on a target. See the method llvm::DataLayout::getIntPtrType.

llgo:link (*OpaqueTargetData).IntPtrType C.LLVMIntPtrType

func (*OpaqueTargetData) IntPtrTypeForAS

func (self *OpaqueTargetData) IntPtrTypeForAS(AS c.Uint) TypeRef

Returns the integer type that is the same size as a pointer on a target. This version allows the address space to be specified. See the method llvm::DataLayout::getIntPtrType.

llgo:link (*OpaqueTargetData).IntPtrTypeForAS C.LLVMIntPtrTypeForAS

func (*OpaqueTargetData) OffsetOfElement

func (self *OpaqueTargetData) OffsetOfElement(StructTy TypeRef, Element c.Uint) c.UlongLong

Computes the byte offset of the indexed struct element for a target. See the method llvm::StructLayout::getElementContainingOffset.

llgo:link (*OpaqueTargetData).OffsetOfElement C.LLVMOffsetOfElement

func (*OpaqueTargetData) PointerSize

func (self *OpaqueTargetData) PointerSize() c.Uint

Returns the pointer size in bytes for a target. See the method llvm::DataLayout::getPointerSize.

llgo:link (*OpaqueTargetData).PointerSize C.LLVMPointerSize

func (*OpaqueTargetData) PointerSizeForAS

func (self *OpaqueTargetData) PointerSizeForAS(AS c.Uint) c.Uint

Returns the pointer size in bytes for a target for a specified address space. See the method llvm::DataLayout::getPointerSize.

llgo:link (*OpaqueTargetData).PointerSizeForAS C.LLVMPointerSizeForAS

func (*OpaqueTargetData) PreferredAlignmentOfGlobal

func (self *OpaqueTargetData) PreferredAlignmentOfGlobal(GlobalVar ValueRef) c.Uint

Computes the preferred alignment of a global variable in bytes for a target. See the method llvm::DataLayout::getPreferredAlignment.

llgo:link (*OpaqueTargetData).PreferredAlignmentOfGlobal C.LLVMPreferredAlignmentOfGlobal

func (*OpaqueTargetData) PreferredAlignmentOfType

func (self *OpaqueTargetData) PreferredAlignmentOfType(Ty TypeRef) c.Uint

Computes the preferred alignment of a type in bytes for a target. See the method llvm::DataLayout::getTypeABISize.

llgo:link (*OpaqueTargetData).PreferredAlignmentOfType C.LLVMPreferredAlignmentOfType

func (*OpaqueTargetData) SizeOfTypeInBits

func (self *OpaqueTargetData) SizeOfTypeInBits(Ty TypeRef) c.UlongLong

Computes the size of a type in bits for a target. See the method llvm::DataLayout::getTypeSizeInBits.

llgo:link (*OpaqueTargetData).SizeOfTypeInBits C.LLVMSizeOfTypeInBits

func (*OpaqueTargetData) StoreSizeOfType

func (self *OpaqueTargetData) StoreSizeOfType(Ty TypeRef) c.UlongLong

Computes the storage size of a type in bytes for a target. See the method llvm::DataLayout::getTypeStoreSize.

llgo:link (*OpaqueTargetData).StoreSizeOfType C.LLVMStoreSizeOfType

type OpaqueTargetLibraryInfotData

type OpaqueTargetLibraryInfotData struct {
}

func (*OpaqueTargetLibraryInfotData) AddTargetLibraryInfo

func (self *OpaqueTargetLibraryInfotData) AddTargetLibraryInfo(PM PassManagerRef)

Adds target library information to a pass manager. This does not take ownership of the target library info. See the method llvm::PassManagerBase::add.

llgo:link (*OpaqueTargetLibraryInfotData).AddTargetLibraryInfo C.LLVMAddTargetLibraryInfo

type OpaqueTargetMachine

type OpaqueTargetMachine struct {
}

func (*OpaqueTargetMachine) AddAnalysisPasses

func (self *OpaqueTargetMachine) AddAnalysisPasses(PM PassManagerRef)

Adds the target-specific analysis passes to the pass manager.

llgo:link (*OpaqueTargetMachine).AddAnalysisPasses C.LLVMAddAnalysisPasses

func (*OpaqueTargetMachine) CreateTargetDataLayout

func (self *OpaqueTargetMachine) CreateTargetDataLayout() TargetDataRef

Create a DataLayout based on the targetMachine.

llgo:link (*OpaqueTargetMachine).CreateTargetDataLayout C.LLVMCreateTargetDataLayout

func (*OpaqueTargetMachine) DisposeTargetMachine

func (self *OpaqueTargetMachine) DisposeTargetMachine()

Dispose the LLVMTargetMachineRef instance generated by LLVMCreateTargetMachine.

llgo:link (*OpaqueTargetMachine).DisposeTargetMachine C.LLVMDisposeTargetMachine

func (*OpaqueTargetMachine) OrcJITTargetMachineBuilderCreateFromTargetMachine

func (self *OpaqueTargetMachine) OrcJITTargetMachineBuilderCreateFromTargetMachine() OrcJITTargetMachineBuilderRef

Create a JITTargetMachineBuilder from the given TargetMachine template.

This operation takes ownership of the given TargetMachine and destroys it before returing. The resulting JITTargetMachineBuilder is owned by the client and must be passed to a consuming operation (e.g. LLVMOrcLLJITBuilderSetJITTargetMachineBuilder) or disposed of by calling LLVMOrcDisposeJITTargetMachineBuilder.

llgo:link (*OpaqueTargetMachine).OrcJITTargetMachineBuilderCreateFromTargetMachine C.LLVMOrcJITTargetMachineBuilderCreateFromTargetMachine

func (*OpaqueTargetMachine) SetTargetMachineAsmVerbosity

func (self *OpaqueTargetMachine) SetTargetMachineAsmVerbosity(VerboseAsm Bool)

Set the target machine's ASM verbosity.

llgo:link (*OpaqueTargetMachine).SetTargetMachineAsmVerbosity C.LLVMSetTargetMachineAsmVerbosity

func (*OpaqueTargetMachine) SetTargetMachineFastISel

func (self *OpaqueTargetMachine) SetTargetMachineFastISel(Enable Bool)

Enable fast-path instruction selection.

llgo:link (*OpaqueTargetMachine).SetTargetMachineFastISel C.LLVMSetTargetMachineFastISel

func (*OpaqueTargetMachine) SetTargetMachineGlobalISel

func (self *OpaqueTargetMachine) SetTargetMachineGlobalISel(Enable Bool)

Enable global instruction selection.

llgo:link (*OpaqueTargetMachine).SetTargetMachineGlobalISel C.LLVMSetTargetMachineGlobalISel

func (*OpaqueTargetMachine) SetTargetMachineGlobalISelAbort

func (self *OpaqueTargetMachine) SetTargetMachineGlobalISelAbort(Mode GlobalISelAbortMode)

Set abort behaviour when global instruction selection fails to lower/select an instruction.

llgo:link (*OpaqueTargetMachine).SetTargetMachineGlobalISelAbort C.LLVMSetTargetMachineGlobalISelAbort

func (*OpaqueTargetMachine) SetTargetMachineMachineOutliner

func (self *OpaqueTargetMachine) SetTargetMachineMachineOutliner(Enable Bool)

Enable the MachineOutliner pass.

llgo:link (*OpaqueTargetMachine).SetTargetMachineMachineOutliner C.LLVMSetTargetMachineMachineOutliner

func (*OpaqueTargetMachine) TargetMachineCPU

func (self *OpaqueTargetMachine) TargetMachineCPU() *c.Char

Returns the cpu used creating this target machine. See llvm::TargetMachine::getCPU. The result needs to be disposed with LLVMDisposeMessage.

llgo:link (*OpaqueTargetMachine).TargetMachineCPU C.LLVMGetTargetMachineCPU

func (*OpaqueTargetMachine) TargetMachineEmitToFile

func (self *OpaqueTargetMachine) TargetMachineEmitToFile(M ModuleRef, Filename *c.Char, codegen CodeGenFileType, ErrorMessage **c.Char) Bool

Emits an asm or object file for the given module to the filename. This wraps several c++ only classes (among them a file stream). Returns any error in ErrorMessage. Use LLVMDisposeMessage to dispose the message.

llgo:link (*OpaqueTargetMachine).TargetMachineEmitToFile C.LLVMTargetMachineEmitToFile

func (*OpaqueTargetMachine) TargetMachineEmitToMemoryBuffer

func (self *OpaqueTargetMachine) TargetMachineEmitToMemoryBuffer(M ModuleRef, codegen CodeGenFileType, ErrorMessage **c.Char, OutMemBuf *MemoryBufferRef) Bool

Compile the LLVM IR stored in \p M and store the result in \p OutMemBuf.

llgo:link (*OpaqueTargetMachine).TargetMachineEmitToMemoryBuffer C.LLVMTargetMachineEmitToMemoryBuffer

func (*OpaqueTargetMachine) TargetMachineFeatureString

func (self *OpaqueTargetMachine) TargetMachineFeatureString() *c.Char

Returns the feature string used creating this target machine. See llvm::TargetMachine::getFeatureString. The result needs to be disposed with LLVMDisposeMessage.

llgo:link (*OpaqueTargetMachine).TargetMachineFeatureString C.LLVMGetTargetMachineFeatureString

func (*OpaqueTargetMachine) TargetMachineTarget

func (self *OpaqueTargetMachine) TargetMachineTarget() TargetRef

Returns the Target used in a TargetMachine

llgo:link (*OpaqueTargetMachine).TargetMachineTarget C.LLVMGetTargetMachineTarget

func (*OpaqueTargetMachine) TargetMachineTriple

func (self *OpaqueTargetMachine) TargetMachineTriple() *c.Char

Returns the triple used creating this target machine. See llvm::TargetMachine::getTriple. The result needs to be disposed with LLVMDisposeMessage.

llgo:link (*OpaqueTargetMachine).TargetMachineTriple C.LLVMGetTargetMachineTriple

type OpaqueTargetMachineOptions

type OpaqueTargetMachineOptions struct {
}

func (*OpaqueTargetMachineOptions) DisposeTargetMachineOptions

func (self *OpaqueTargetMachineOptions) DisposeTargetMachineOptions()

Dispose of an LLVMTargetMachineOptionsRef instance.

llgo:link (*OpaqueTargetMachineOptions).DisposeTargetMachineOptions C.LLVMDisposeTargetMachineOptions

func (*OpaqueTargetMachineOptions) TargetMachineOptionsSetABI

func (self *OpaqueTargetMachineOptions) TargetMachineOptionsSetABI(ABI *c.Char)

llgo:link (*OpaqueTargetMachineOptions).TargetMachineOptionsSetABI C.LLVMTargetMachineOptionsSetABI

func (*OpaqueTargetMachineOptions) TargetMachineOptionsSetCPU

func (self *OpaqueTargetMachineOptions) TargetMachineOptionsSetCPU(CPU *c.Char)

llgo:link (*OpaqueTargetMachineOptions).TargetMachineOptionsSetCPU C.LLVMTargetMachineOptionsSetCPU

func (*OpaqueTargetMachineOptions) TargetMachineOptionsSetCodeGenOptLevel

func (self *OpaqueTargetMachineOptions) TargetMachineOptionsSetCodeGenOptLevel(Level CodeGenOptLevel)

llgo:link (*OpaqueTargetMachineOptions).TargetMachineOptionsSetCodeGenOptLevel C.LLVMTargetMachineOptionsSetCodeGenOptLevel

func (*OpaqueTargetMachineOptions) TargetMachineOptionsSetCodeModel

func (self *OpaqueTargetMachineOptions) TargetMachineOptionsSetCodeModel(CodeModel CodeModel)

llgo:link (*OpaqueTargetMachineOptions).TargetMachineOptionsSetCodeModel C.LLVMTargetMachineOptionsSetCodeModel

func (*OpaqueTargetMachineOptions) TargetMachineOptionsSetFeatures

func (self *OpaqueTargetMachineOptions) TargetMachineOptionsSetFeatures(Features *c.Char)

Set the list of features for the target machine.

\param Features a comma-separated list of features.

llgo:link (*OpaqueTargetMachineOptions).TargetMachineOptionsSetFeatures C.LLVMTargetMachineOptionsSetFeatures

func (*OpaqueTargetMachineOptions) TargetMachineOptionsSetRelocMode

func (self *OpaqueTargetMachineOptions) TargetMachineOptionsSetRelocMode(Reloc RelocMode)

llgo:link (*OpaqueTargetMachineOptions).TargetMachineOptionsSetRelocMode C.LLVMTargetMachineOptionsSetRelocMode

type OpaqueThinLTOCodeGenerator

type OpaqueThinLTOCodeGenerator struct {
}

func (*OpaqueThinLTOCodeGenerator) ThinltoCodegenAddCrossReferencedSymbol

func (self *OpaqueThinLTOCodeGenerator) ThinltoCodegenAddCrossReferencedSymbol(name *c.Char, length c.Int)

Adds a symbol to the list of global symbols that are cross-referenced between ThinLTO files. If the ThinLTO CodeGenerator can ensure that every references from a ThinLTO module to this symbol is optimized away, then the symbol can be discarded.

\since LTO_API_VERSION=18

llgo:link (*OpaqueThinLTOCodeGenerator).ThinltoCodegenAddCrossReferencedSymbol C.thinlto_codegen_add_cross_referenced_symbol

func (*OpaqueThinLTOCodeGenerator) ThinltoCodegenAddModule

func (self *OpaqueThinLTOCodeGenerator) ThinltoCodegenAddModule(identifier *c.Char, data *c.Char, length c.Int)

Add a module to a ThinLTO code generator. Identifier has to be unique among all the modules in a code generator. The data buffer stays owned by the client, and is expected to be available for the entire lifetime of the thinlto_code_gen_t it is added to.

On failure, returns NULL (check lto_get_error_message() for details).

\since LTO_API_VERSION=18

llgo:link (*OpaqueThinLTOCodeGenerator).ThinltoCodegenAddModule C.thinlto_codegen_add_module

func (*OpaqueThinLTOCodeGenerator) ThinltoCodegenAddMustPreserveSymbol

func (self *OpaqueThinLTOCodeGenerator) ThinltoCodegenAddMustPreserveSymbol(name *c.Char, length c.Int)

Adds a symbol to the list of global symbols that must exist in the final generated code. If a function is not listed there, it might be inlined into every usage and optimized away. For every single module, the functions referenced from code outside of the ThinLTO modules need to be added here.

\since LTO_API_VERSION=18

llgo:link (*OpaqueThinLTOCodeGenerator).ThinltoCodegenAddMustPreserveSymbol C.thinlto_codegen_add_must_preserve_symbol

func (*OpaqueThinLTOCodeGenerator) ThinltoCodegenDisableCodegen

func (self *OpaqueThinLTOCodeGenerator) ThinltoCodegenDisableCodegen(disable LtoBoolT)

Disable CodeGen, only run the stages till codegen and stop. The output will be bitcode.

\since LTO_API_VERSION=19

llgo:link (*OpaqueThinLTOCodeGenerator).ThinltoCodegenDisableCodegen C.thinlto_codegen_disable_codegen

func (*OpaqueThinLTOCodeGenerator) ThinltoCodegenDispose

func (self *OpaqueThinLTOCodeGenerator) ThinltoCodegenDispose()

Frees the generator and all memory it internally allocated. Upon return the thinlto_code_gen_t is no longer valid.

\since LTO_API_VERSION=18

llgo:link (*OpaqueThinLTOCodeGenerator).ThinltoCodegenDispose C.thinlto_codegen_dispose

func (*OpaqueThinLTOCodeGenerator) ThinltoCodegenProcess

func (self *OpaqueThinLTOCodeGenerator) ThinltoCodegenProcess()

Optimize and codegen all the modules added to the codegenerator using ThinLTO. Resulting objects are accessible using thinlto_module_get_object().

\since LTO_API_VERSION=18

llgo:link (*OpaqueThinLTOCodeGenerator).ThinltoCodegenProcess C.thinlto_codegen_process

func (*OpaqueThinLTOCodeGenerator) ThinltoCodegenSetCacheDir

func (self *OpaqueThinLTOCodeGenerator) ThinltoCodegenSetCacheDir(cache_dir *c.Char)

Sets the path to a directory to use as a cache storage for incremental build. Setting this activates caching.

\since LTO_API_VERSION=18

llgo:link (*OpaqueThinLTOCodeGenerator).ThinltoCodegenSetCacheDir C.thinlto_codegen_set_cache_dir

func (*OpaqueThinLTOCodeGenerator) ThinltoCodegenSetCacheEntryExpiration

func (self *OpaqueThinLTOCodeGenerator) ThinltoCodegenSetCacheEntryExpiration(expiration c.Uint)

Sets the expiration (in seconds) for an entry in the cache. An unspecified default value will be applied. A value of 0 will be ignored.

\since LTO_API_VERSION=18

llgo:link (*OpaqueThinLTOCodeGenerator).ThinltoCodegenSetCacheEntryExpiration C.thinlto_codegen_set_cache_entry_expiration

func (*OpaqueThinLTOCodeGenerator) ThinltoCodegenSetCachePruningInterval

func (self *OpaqueThinLTOCodeGenerator) ThinltoCodegenSetCachePruningInterval(interval c.Int)

Sets the cache pruning interval (in seconds). A negative value disables the pruning. An unspecified default value will be applied, and a value of 0 will force prunning to occur.

\since LTO_API_VERSION=18

llgo:link (*OpaqueThinLTOCodeGenerator).ThinltoCodegenSetCachePruningInterval C.thinlto_codegen_set_cache_pruning_interval

func (*OpaqueThinLTOCodeGenerator) ThinltoCodegenSetCacheSizeBytes

func (self *OpaqueThinLTOCodeGenerator) ThinltoCodegenSetCacheSizeBytes(max_size_bytes c.Uint)

Sets the maximum size of the cache directory (in bytes). A value over the amount of available space on the disk will be reduced to the amount of available space. An unspecified default value will be applied. A value of 0 will be ignored.

\since LTO_API_VERSION=22

llgo:link (*OpaqueThinLTOCodeGenerator).ThinltoCodegenSetCacheSizeBytes C.thinlto_codegen_set_cache_size_bytes

func (*OpaqueThinLTOCodeGenerator) ThinltoCodegenSetCacheSizeFiles

func (self *OpaqueThinLTOCodeGenerator) ThinltoCodegenSetCacheSizeFiles(max_size_files c.Uint)

Sets the maximum number of files in the cache directory. An unspecified default value will be applied. A value of 0 will be ignored.

\since LTO_API_VERSION=22

llgo:link (*OpaqueThinLTOCodeGenerator).ThinltoCodegenSetCacheSizeFiles C.thinlto_codegen_set_cache_size_files

func (*OpaqueThinLTOCodeGenerator) ThinltoCodegenSetCacheSizeMegabytes

func (self *OpaqueThinLTOCodeGenerator) ThinltoCodegenSetCacheSizeMegabytes(max_size_megabytes c.Uint)

Same as thinlto_codegen_set_cache_size_bytes, except the maximum size is in megabytes (2^20 bytes).

\since LTO_API_VERSION=23

llgo:link (*OpaqueThinLTOCodeGenerator).ThinltoCodegenSetCacheSizeMegabytes C.thinlto_codegen_set_cache_size_megabytes

func (*OpaqueThinLTOCodeGenerator) ThinltoCodegenSetCodegenOnly

func (self *OpaqueThinLTOCodeGenerator) ThinltoCodegenSetCodegenOnly(codegen_only LtoBoolT)

Perform CodeGen only: disable all other stages.

\since LTO_API_VERSION=19

llgo:link (*OpaqueThinLTOCodeGenerator).ThinltoCodegenSetCodegenOnly C.thinlto_codegen_set_codegen_only

func (*OpaqueThinLTOCodeGenerator) ThinltoCodegenSetCpu

func (self *OpaqueThinLTOCodeGenerator) ThinltoCodegenSetCpu(cpu *c.Char)

Sets the cpu to generate code for.

\since LTO_API_VERSION=18

llgo:link (*OpaqueThinLTOCodeGenerator).ThinltoCodegenSetCpu C.thinlto_codegen_set_cpu

func (*OpaqueThinLTOCodeGenerator) ThinltoCodegenSetFinalCacheSizeRelativeToAvailableSpace

func (self *OpaqueThinLTOCodeGenerator) ThinltoCodegenSetFinalCacheSizeRelativeToAvailableSpace(percentage c.Uint)

Sets the maximum cache size that can be persistent across build, in terms of percentage of the available space on the disk. Set to 100 to indicate no limit, 50 to indicate that the cache size will not be left over half the available space. A value over 100 will be reduced to 100, a value of 0 will be ignored. An unspecified default value will be applied.

The formula looks like:

AvailableSpace = FreeSpace + ExistingCacheSize
NewCacheSize = AvailableSpace * P/100

\since LTO_API_VERSION=18

llgo:link (*OpaqueThinLTOCodeGenerator).ThinltoCodegenSetFinalCacheSizeRelativeToAvailableSpace C.thinlto_codegen_set_final_cache_size_relative_to_available_space

func (*OpaqueThinLTOCodeGenerator) ThinltoCodegenSetPicModel

func (self *OpaqueThinLTOCodeGenerator) ThinltoCodegenSetPicModel(_llcppg_param2 LtoCodegenModel) LtoBoolT

Sets which PIC code model to generate. Returns true on error (check lto_get_error_message() for details).

\since LTO_API_VERSION=18

llgo:link (*OpaqueThinLTOCodeGenerator).ThinltoCodegenSetPicModel C.thinlto_codegen_set_pic_model

func (*OpaqueThinLTOCodeGenerator) ThinltoCodegenSetSavetempsDir

func (self *OpaqueThinLTOCodeGenerator) ThinltoCodegenSetSavetempsDir(save_temps_dir *c.Char)

Sets the path to a directory to use as a storage for temporary bitcode files. The intention is to make the bitcode files available for debugging at various stage of the pipeline.

\since LTO_API_VERSION=18

llgo:link (*OpaqueThinLTOCodeGenerator).ThinltoCodegenSetSavetempsDir C.thinlto_codegen_set_savetemps_dir

func (*OpaqueThinLTOCodeGenerator) ThinltoModuleGetNumObjectFiles

func (self *OpaqueThinLTOCodeGenerator) ThinltoModuleGetNumObjectFiles() c.Uint

Returns the number of object files produced by the ThinLTO CodeGenerator.

It usually matches the number of input files, but this is not a guarantee of the API and may change in future implementation, so the client should not assume it.

\since LTO_API_VERSION=21

llgo:link (*OpaqueThinLTOCodeGenerator).ThinltoModuleGetNumObjectFiles C.thinlto_module_get_num_object_files

func (*OpaqueThinLTOCodeGenerator) ThinltoModuleGetNumObjects

func (self *OpaqueThinLTOCodeGenerator) ThinltoModuleGetNumObjects() c.Uint

Returns the number of object files produced by the ThinLTO CodeGenerator.

It usually matches the number of input files, but this is not a guarantee of the API and may change in future implementation, so the client should not assume it.

\since LTO_API_VERSION=18

llgo:link (*OpaqueThinLTOCodeGenerator).ThinltoModuleGetNumObjects C.thinlto_module_get_num_objects

func (*OpaqueThinLTOCodeGenerator) ThinltoModuleGetObject

func (self *OpaqueThinLTOCodeGenerator) ThinltoModuleGetObject(index c.Uint) LTOObjectBuffer

Returns a reference to the ith object file produced by the ThinLTO CodeGenerator.

Client should use \p thinlto_module_get_num_objects() to get the number of available objects.

\since LTO_API_VERSION=18

llgo:link (*OpaqueThinLTOCodeGenerator).ThinltoModuleGetObject C.thinlto_module_get_object

func (*OpaqueThinLTOCodeGenerator) ThinltoModuleGetObjectFile

func (self *OpaqueThinLTOCodeGenerator) ThinltoModuleGetObjectFile(index c.Uint) *c.Char

Returns the path to the ith object file produced by the ThinLTO CodeGenerator.

Client should use \p thinlto_module_get_num_object_files() to get the number of available objects.

\since LTO_API_VERSION=21

llgo:link (*OpaqueThinLTOCodeGenerator).ThinltoModuleGetObjectFile C.thinlto_module_get_object_file

func (*OpaqueThinLTOCodeGenerator) ThinltoSetGeneratedObjectsDir

func (self *OpaqueThinLTOCodeGenerator) ThinltoSetGeneratedObjectsDir(save_temps_dir *c.Char)

Set the path to a directory where to save generated object files. This path can be used by a linker to request on-disk files instead of in-memory buffers. When set, results are available through thinlto_module_get_object_file() instead of thinlto_module_get_object().

\since LTO_API_VERSION=21

llgo:link (*OpaqueThinLTOCodeGenerator).ThinltoSetGeneratedObjectsDir C.thinlto_set_generated_objects_dir

type OpaqueType

type OpaqueType struct {
}

func (*OpaqueType) AlignOf

func (self *OpaqueType) AlignOf() ValueRef

llgo:link (*OpaqueType).AlignOf C.LLVMAlignOf

func (*OpaqueType) ArrayLength

func (self *OpaqueType) ArrayLength() c.Uint

Obtain the length of an array type.

This only works on types that represent arrays.

@deprecated LLVMGetArrayLength is deprecated in favor of the API accurate LLVMGetArrayLength2 @see llvm::ArrayType::getNumElements()

llgo:link (*OpaqueType).ArrayLength C.LLVMGetArrayLength

func (*OpaqueType) ArrayLength2

func (self *OpaqueType) ArrayLength2() c.Uint64T

Obtain the length of an array type.

This only works on types that represent arrays.

@see llvm::ArrayType::getNumElements()

llgo:link (*OpaqueType).ArrayLength2 C.LLVMGetArrayLength2

func (*OpaqueType) ArrayType

func (self *OpaqueType) ArrayType(ElementCount c.Uint) TypeRef

Create a fixed size array type that refers to a specific type.

The created type will exist in the context that its element type exists in.

@deprecated LLVMArrayType is deprecated in favor of the API accurate LLVMArrayType2 @see llvm::ArrayType::get()

llgo:link (*OpaqueType).ArrayType C.LLVMArrayType

func (*OpaqueType) ArrayType2

func (self *OpaqueType) ArrayType2(ElementCount c.Uint64T) TypeRef

Create a fixed size array type that refers to a specific type.

The created type will exist in the context that its element type exists in.

@see llvm::ArrayType::get()

llgo:link (*OpaqueType).ArrayType2 C.LLVMArrayType2

func (*OpaqueType) ConstAllOnes

func (self *OpaqueType) ConstAllOnes() ValueRef

Obtain a constant value referring to the instance of a type consisting of all ones.

This is only valid for integer types.

@see llvm::Constant::getAllOnesValue()

llgo:link (*OpaqueType).ConstAllOnes C.LLVMConstAllOnes

func (*OpaqueType) ConstArray

func (self *OpaqueType) ConstArray(ConstantVals *ValueRef, Length c.Uint) ValueRef

Create a ConstantArray from values.

@deprecated LLVMConstArray is deprecated in favor of the API accurate LLVMConstArray2 @see llvm::ConstantArray::get()

llgo:link (*OpaqueType).ConstArray C.LLVMConstArray

func (*OpaqueType) ConstArray2

func (self *OpaqueType) ConstArray2(ConstantVals *ValueRef, Length c.Uint64T) ValueRef

Create a ConstantArray from values.

@see llvm::ConstantArray::get()

llgo:link (*OpaqueType).ConstArray2 C.LLVMConstArray2

func (*OpaqueType) ConstDataArray

func (self *OpaqueType) ConstDataArray(Data *c.Char, SizeInBytes c.SizeT) ValueRef

Create a ConstantDataArray from raw values.

ElementTy must be one of i8, i16, i32, i64, half, bfloat, float, or double. Data points to a contiguous buffer of raw values in the host endianness. The element count is inferred from the element type and the data size in bytes.

@see llvm::ConstantDataArray::getRaw()

llgo:link (*OpaqueType).ConstDataArray C.LLVMConstDataArray

func (*OpaqueType) ConstFPFromBits

func (self *OpaqueType) ConstFPFromBits(N *c.Uint64T) ValueRef

Obtain a constant for a floating point value from array of 64 bit values. The length of the array N must be ceildiv(bits, 64), where bits is the scalar size in bits of the floating-point type.

llgo:link (*OpaqueType).ConstFPFromBits C.LLVMConstFPFromBits

func (*OpaqueType) ConstGEP2

func (self *OpaqueType) ConstGEP2(ConstantVal ValueRef, ConstantIndices *ValueRef, NumIndices c.Uint) ValueRef

llgo:link (*OpaqueType).ConstGEP2 C.LLVMConstGEP2

func (*OpaqueType) ConstGEPWithNoWrapFlags

func (self *OpaqueType) ConstGEPWithNoWrapFlags(ConstantVal ValueRef, ConstantIndices *ValueRef, NumIndices c.Uint, NoWrapFlags GEPNoWrapFlags) ValueRef

Creates a constant GetElementPtr expression. Similar to LLVMConstGEP2, but allows specifying the no-wrap flags.

@see llvm::ConstantExpr::getGetElementPtr()

llgo:link (*OpaqueType).ConstGEPWithNoWrapFlags C.LLVMConstGEPWithNoWrapFlags

func (*OpaqueType) ConstInBoundsGEP2

func (self *OpaqueType) ConstInBoundsGEP2(ConstantVal ValueRef, ConstantIndices *ValueRef, NumIndices c.Uint) ValueRef

llgo:link (*OpaqueType).ConstInBoundsGEP2 C.LLVMConstInBoundsGEP2

func (*OpaqueType) ConstInlineAsm deprecated

func (self *OpaqueType) ConstInlineAsm(AsmString *c.Char, Constraints *c.Char, HasSideEffects Bool, IsAlignStack Bool) ValueRef

Deprecated: Use LLVMGetInlineAsm instead.

llgo:link (*OpaqueType).ConstInlineAsm C.LLVMConstInlineAsm

func (*OpaqueType) ConstInt

func (self *OpaqueType) ConstInt(N c.UlongLong, SignExtend Bool) ValueRef

Obtain a constant value for an integer type.

The returned value corresponds to a llvm::ConstantInt.

@see llvm::ConstantInt::get()

@param IntTy Integer type to obtain value of. @param N The value the returned instance should refer to. @param SignExtend Whether to sign extend the produced value.

llgo:link (*OpaqueType).ConstInt C.LLVMConstInt

func (*OpaqueType) ConstIntOfArbitraryPrecision

func (self *OpaqueType) ConstIntOfArbitraryPrecision(NumWords c.Uint, Words *c.Uint64T) ValueRef

Obtain a constant value for an integer of arbitrary precision.

@see llvm::ConstantInt::get()

llgo:link (*OpaqueType).ConstIntOfArbitraryPrecision C.LLVMConstIntOfArbitraryPrecision

func (*OpaqueType) ConstIntOfString

func (self *OpaqueType) ConstIntOfString(Text *c.Char, Radix c.Uint8T) ValueRef

Obtain a constant value for an integer parsed from a string.

A similar API, LLVMConstIntOfStringAndSize is also available. If the string's length is available, it is preferred to call that function instead.

@see llvm::ConstantInt::get()

llgo:link (*OpaqueType).ConstIntOfString C.LLVMConstIntOfString

func (*OpaqueType) ConstIntOfStringAndSize

func (self *OpaqueType) ConstIntOfStringAndSize(Text *c.Char, SLen c.Uint, Radix c.Uint8T) ValueRef

Obtain a constant value for an integer parsed from a string with specified length.

@see llvm::ConstantInt::get()

llgo:link (*OpaqueType).ConstIntOfStringAndSize C.LLVMConstIntOfStringAndSize

func (*OpaqueType) ConstNamedStruct

func (self *OpaqueType) ConstNamedStruct(ConstantVals *ValueRef, Count c.Uint) ValueRef

Create a non-anonymous ConstantStruct from values.

@see llvm::ConstantStruct::get()

llgo:link (*OpaqueType).ConstNamedStruct C.LLVMConstNamedStruct

func (*OpaqueType) ConstNull

func (self *OpaqueType) ConstNull() ValueRef

Obtain a constant value referring to the null instance of a type.

@see llvm::Constant::getNullValue()

llgo:link (*OpaqueType).ConstNull C.LLVMConstNull

func (*OpaqueType) ConstPointerNull

func (self *OpaqueType) ConstPointerNull() ValueRef

Obtain a constant that is a constant pointer pointing to NULL for a specified type.

llgo:link (*OpaqueType).ConstPointerNull C.LLVMConstPointerNull

func (*OpaqueType) ConstReal

func (self *OpaqueType) ConstReal(N c.Double) ValueRef

Obtain a constant value referring to a double floating point value.

llgo:link (*OpaqueType).ConstReal C.LLVMConstReal

func (*OpaqueType) ConstRealOfString

func (self *OpaqueType) ConstRealOfString(Text *c.Char) ValueRef

Obtain a constant for a floating point value parsed from a string.

A similar API, LLVMConstRealOfStringAndSize is also available. It should be used if the input string's length is known.

llgo:link (*OpaqueType).ConstRealOfString C.LLVMConstRealOfString

func (*OpaqueType) ConstRealOfStringAndSize

func (self *OpaqueType) ConstRealOfStringAndSize(Text *c.Char, SLen c.Uint) ValueRef

Obtain a constant for a floating point value parsed from a string.

llgo:link (*OpaqueType).ConstRealOfStringAndSize C.LLVMConstRealOfStringAndSize

func (*OpaqueType) CountParamTypes

func (self *OpaqueType) CountParamTypes() c.Uint

Obtain the number of parameters this function accepts.

llgo:link (*OpaqueType).CountParamTypes C.LLVMCountParamTypes

func (*OpaqueType) CountStructElementTypes

func (self *OpaqueType) CountStructElementTypes() c.Uint

Get the number of elements defined inside the structure.

@see llvm::StructType::getNumElements()

llgo:link (*OpaqueType).CountStructElementTypes C.LLVMCountStructElementTypes

func (*OpaqueType) CreateGenericValueOfFloat

func (self *OpaqueType) CreateGenericValueOfFloat(N c.Double) GenericValueRef

llgo:link (*OpaqueType).CreateGenericValueOfFloat C.LLVMCreateGenericValueOfFloat

func (*OpaqueType) CreateGenericValueOfInt

func (self *OpaqueType) CreateGenericValueOfInt(N c.UlongLong, IsSigned Bool) GenericValueRef

llgo:link (*OpaqueType).CreateGenericValueOfInt C.LLVMCreateGenericValueOfInt

func (*OpaqueType) DumpType

func (self *OpaqueType) DumpType()

Dump a representation of a type to stderr.

@see llvm::Type::dump()

llgo:link (*OpaqueType).DumpType C.LLVMDumpType

func (*OpaqueType) ElementType

func (self *OpaqueType) ElementType() TypeRef

Obtain the element type of an array or vector type.

@see llvm::SequentialType::getElementType()

llgo:link (*OpaqueType).ElementType C.LLVMGetElementType

func (*OpaqueType) FunctionType

func (self *OpaqueType) FunctionType(ParamTypes *TypeRef, ParamCount c.Uint, IsVarArg Bool) TypeRef

Obtain a function type consisting of a specified signature.

The function is defined as a tuple of a return Type, a list of parameter types, and whether the function is variadic.

llgo:link (*OpaqueType).FunctionType C.LLVMFunctionType

func (*OpaqueType) GenericValueToFloat

func (self *OpaqueType) GenericValueToFloat(GenVal GenericValueRef) c.Double

llgo:link (*OpaqueType).GenericValueToFloat C.LLVMGenericValueToFloat

func (*OpaqueType) InlineAsm

func (self *OpaqueType) InlineAsm(AsmString *c.Char, AsmStringSize c.SizeT, Constraints *c.Char, ConstraintsSize c.SizeT, HasSideEffects Bool, IsAlignStack Bool, Dialect InlineAsmDialect, CanThrow Bool) ValueRef

Create the specified uniqued inline asm string.

@see InlineAsm::get()

llgo:link (*OpaqueType).InlineAsm C.LLVMGetInlineAsm

func (*OpaqueType) IntTypeWidth

func (self *OpaqueType) IntTypeWidth() c.Uint

llgo:link (*OpaqueType).IntTypeWidth C.LLVMGetIntTypeWidth

func (*OpaqueType) IsFunctionVarArg

func (self *OpaqueType) IsFunctionVarArg() Bool

Returns whether a function type is variadic.

llgo:link (*OpaqueType).IsFunctionVarArg C.LLVMIsFunctionVarArg

func (*OpaqueType) IsLiteralStruct

func (self *OpaqueType) IsLiteralStruct() Bool

Determine whether a structure is literal.

@see llvm::StructType::isLiteral()

llgo:link (*OpaqueType).IsLiteralStruct C.LLVMIsLiteralStruct

func (*OpaqueType) IsOpaqueStruct

func (self *OpaqueType) IsOpaqueStruct() Bool

Determine whether a structure is opaque.

@see llvm::StructType::isOpaque()

llgo:link (*OpaqueType).IsOpaqueStruct C.LLVMIsOpaqueStruct

func (*OpaqueType) IsPackedStruct

func (self *OpaqueType) IsPackedStruct() Bool

Determine whether a structure is packed.

@see llvm::StructType::isPacked()

llgo:link (*OpaqueType).IsPackedStruct C.LLVMIsPackedStruct

func (*OpaqueType) NumContainedTypes

func (self *OpaqueType) NumContainedTypes() c.Uint
Return the number of types in the derived type.

@see llvm::Type::getNumContainedTypes()

llgo:link (*OpaqueType).NumContainedTypes C.LLVMGetNumContainedTypes

func (*OpaqueType) ParamTypes

func (self *OpaqueType) ParamTypes(Dest *TypeRef)

Obtain the types of a function's parameters.

The Dest parameter should point to a pre-allocated array of LLVMTypeRef at least LLVMCountParamTypes() large. On return, the first LLVMCountParamTypes() entries in the array will be populated with LLVMTypeRef instances.

@param FunctionTy The function type to operate on. @param Dest Memory address of an array to be filled with result.

llgo:link (*OpaqueType).ParamTypes C.LLVMGetParamTypes

func (*OpaqueType) PointerAddressSpace

func (self *OpaqueType) PointerAddressSpace() c.Uint

Obtain the address space of a pointer type.

This only works on types that represent pointers.

@see llvm::PointerType::getAddressSpace()

llgo:link (*OpaqueType).PointerAddressSpace C.LLVMGetPointerAddressSpace

func (*OpaqueType) PointerType

func (self *OpaqueType) PointerType(AddressSpace c.Uint) TypeRef

Create a pointer type that points to a defined type.

The created type will exist in the context that its pointee type exists in.

@see llvm::PointerType::get()

llgo:link (*OpaqueType).PointerType C.LLVMPointerType

func (*OpaqueType) PointerTypeIsOpaque

func (self *OpaqueType) PointerTypeIsOpaque() Bool

Determine whether a pointer is opaque.

True if this is an instance of an opaque PointerType.

@see llvm::Type::isOpaquePointerTy()

llgo:link (*OpaqueType).PointerTypeIsOpaque C.LLVMPointerTypeIsOpaque

func (*OpaqueType) Poison

func (self *OpaqueType) Poison() ValueRef

Obtain a constant value referring to a poison value of a type.

@see llvm::PoisonValue::get()

llgo:link (*OpaqueType).Poison C.LLVMGetPoison

func (*OpaqueType) PrintTypeToString

func (self *OpaqueType) PrintTypeToString() *c.Char

Return a string representation of the type. Use LLVMDisposeMessage to free the string.

@see llvm::Type::print()

llgo:link (*OpaqueType).PrintTypeToString C.LLVMPrintTypeToString

func (*OpaqueType) ReturnType

func (self *OpaqueType) ReturnType() TypeRef

Obtain the Type this function Type returns.

llgo:link (*OpaqueType).ReturnType C.LLVMGetReturnType

func (*OpaqueType) ScalableVectorType

func (self *OpaqueType) ScalableVectorType(ElementCount c.Uint) TypeRef

Create a vector type that contains a defined type and has a scalable number of elements.

The created type will exist in the context thats its element type exists in.

@see llvm::ScalableVectorType::get()

llgo:link (*OpaqueType).ScalableVectorType C.LLVMScalableVectorType

func (*OpaqueType) SizeOf

func (self *OpaqueType) SizeOf() ValueRef

llgo:link (*OpaqueType).SizeOf C.LLVMSizeOf

func (*OpaqueType) StructElementTypes

func (self *OpaqueType) StructElementTypes(Dest *TypeRef)

Get the elements within a structure.

The function is passed the address of a pre-allocated array of LLVMTypeRef at least LLVMCountStructElementTypes() long. After invocation, this array will be populated with the structure's elements. The objects in the destination array will have a lifetime of the structure type itself, which is the lifetime of the context it is contained in.

llgo:link (*OpaqueType).StructElementTypes C.LLVMGetStructElementTypes

func (*OpaqueType) StructGetTypeAtIndex

func (self *OpaqueType) StructGetTypeAtIndex(i c.Uint) TypeRef

Get the type of the element at a given index in the structure.

@see llvm::StructType::getTypeAtIndex()

llgo:link (*OpaqueType).StructGetTypeAtIndex C.LLVMStructGetTypeAtIndex

func (*OpaqueType) StructName

func (self *OpaqueType) StructName() *c.Char

Obtain the name of a structure.

@see llvm::StructType::getName()

llgo:link (*OpaqueType).StructName C.LLVMGetStructName

func (*OpaqueType) StructSetBody

func (self *OpaqueType) StructSetBody(ElementTypes *TypeRef, ElementCount c.Uint, Packed Bool)

Set the contents of a structure type.

@see llvm::StructType::setBody()

llgo:link (*OpaqueType).StructSetBody C.LLVMStructSetBody

func (*OpaqueType) StructType

func (self *OpaqueType) StructType(ElementCount c.Uint, Packed Bool) TypeRef

Create a new structure type in the global context.

@see llvm::StructType::create()

llgo:link (*OpaqueType).StructType C.LLVMStructType

func (*OpaqueType) Subtypes

func (self *OpaqueType) Subtypes(Arr *TypeRef)

Returns type's subtypes

@see llvm::Type::subtypes()

llgo:link (*OpaqueType).Subtypes C.LLVMGetSubtypes

func (*OpaqueType) TargetExtTypeIntParam

func (self *OpaqueType) TargetExtTypeIntParam(Idx c.Uint) c.Uint

Get the int parameter at the given index for the target extension type.

@see llvm::TargetExtType::getIntParameter()

llgo:link (*OpaqueType).TargetExtTypeIntParam C.LLVMGetTargetExtTypeIntParam

func (*OpaqueType) TargetExtTypeName

func (self *OpaqueType) TargetExtTypeName() *c.Char

Obtain the name for this target extension type.

@see llvm::TargetExtType::getName()

llgo:link (*OpaqueType).TargetExtTypeName C.LLVMGetTargetExtTypeName

func (*OpaqueType) TargetExtTypeNumIntParams

func (self *OpaqueType) TargetExtTypeNumIntParams() c.Uint

Obtain the number of int parameters for this target extension type.

@see llvm::TargetExtType::getNumIntParameters()

llgo:link (*OpaqueType).TargetExtTypeNumIntParams C.LLVMGetTargetExtTypeNumIntParams

func (*OpaqueType) TargetExtTypeNumTypeParams

func (self *OpaqueType) TargetExtTypeNumTypeParams() c.Uint

Obtain the number of type parameters for this target extension type.

@see llvm::TargetExtType::getNumTypeParameters()

llgo:link (*OpaqueType).TargetExtTypeNumTypeParams C.LLVMGetTargetExtTypeNumTypeParams

func (*OpaqueType) TargetExtTypeTypeParam

func (self *OpaqueType) TargetExtTypeTypeParam(Idx c.Uint) TypeRef

Get the type parameter at the given index for the target extension type.

@see llvm::TargetExtType::getTypeParameter()

llgo:link (*OpaqueType).TargetExtTypeTypeParam C.LLVMGetTargetExtTypeTypeParam

func (*OpaqueType) TypeContext

func (self *OpaqueType) TypeContext() ContextRef

Obtain the context to which this type instance is associated.

@see llvm::Type::getContext()

llgo:link (*OpaqueType).TypeContext C.LLVMGetTypeContext

func (*OpaqueType) TypeIsSized

func (self *OpaqueType) TypeIsSized() Bool

Whether the type has a known size.

Things that don't have a size are abstract types, labels, and void.a

@see llvm::Type::isSized()

llgo:link (*OpaqueType).TypeIsSized C.LLVMTypeIsSized

func (*OpaqueType) TypeKind

func (self *OpaqueType) TypeKind() TypeKind

Obtain the enumerated type of a Type instance.

@see llvm::Type:getTypeID()

llgo:link (*OpaqueType).TypeKind C.LLVMGetTypeKind

func (*OpaqueType) Undef

func (self *OpaqueType) Undef() ValueRef

Obtain a constant value referring to an undefined value of a type.

@see llvm::UndefValue::get()

llgo:link (*OpaqueType).Undef C.LLVMGetUndef

func (*OpaqueType) VectorSize

func (self *OpaqueType) VectorSize() c.Uint

Obtain the (possibly scalable) number of elements in a vector type.

This only works on types that represent vectors (fixed or scalable).

@see llvm::VectorType::getNumElements()

llgo:link (*OpaqueType).VectorSize C.LLVMGetVectorSize

func (*OpaqueType) VectorType

func (self *OpaqueType) VectorType(ElementCount c.Uint) TypeRef

Create a vector type that contains a defined type and has a specific number of elements.

The created type will exist in the context thats its element type exists in.

@see llvm::VectorType::get()

llgo:link (*OpaqueType).VectorType C.LLVMVectorType

type OpaqueUse

type OpaqueUse struct {
}

func (*OpaqueUse) NextUse

func (self *OpaqueUse) NextUse() UseRef

Obtain the next use of a value.

This effectively advances the iterator. It returns NULL if you are on the final use and no more are available.

llgo:link (*OpaqueUse).NextUse C.LLVMGetNextUse

func (*OpaqueUse) UsedValue

func (self *OpaqueUse) UsedValue() ValueRef

Obtain the value this use corresponds to.

@see llvm::Use::get().

llgo:link (*OpaqueUse).UsedValue C.LLVMGetUsedValue

func (*OpaqueUse) User

func (self *OpaqueUse) User() ValueRef

Obtain the user value for a user.

The returned value corresponds to a llvm::User type.

@see llvm::Use::getUser()

llgo:link (*OpaqueUse).User C.LLVMGetUser

type OpaqueValue

type OpaqueValue struct {
}

func (*OpaqueValue) AddAttributeAtIndex

func (self *OpaqueValue) AddAttributeAtIndex(Idx AttributeIndex, A AttributeRef)

Add an attribute to a function.

@see llvm::Function::addAttribute()

llgo:link (*OpaqueValue).AddAttributeAtIndex C.LLVMAddAttributeAtIndex

func (*OpaqueValue) AddCallSiteAttribute

func (self *OpaqueValue) AddCallSiteAttribute(Idx AttributeIndex, A AttributeRef)

llgo:link (*OpaqueValue).AddCallSiteAttribute C.LLVMAddCallSiteAttribute

func (*OpaqueValue) AddCase

func (self *OpaqueValue) AddCase(OnVal ValueRef, Dest BasicBlockRef)

llgo:link (*OpaqueValue).AddCase C.LLVMAddCase

func (*OpaqueValue) AddDestination

func (self *OpaqueValue) AddDestination(Dest BasicBlockRef)

llgo:link (*OpaqueValue).AddDestination C.LLVMAddDestination

func (*OpaqueValue) AddHandler

func (self *OpaqueValue) AddHandler(Dest BasicBlockRef)

llgo:link (*OpaqueValue).AddHandler C.LLVMAddHandler

func (*OpaqueValue) AddIncoming

func (self *OpaqueValue) AddIncoming(IncomingValues *ValueRef, IncomingBlocks *BasicBlockRef, Count c.Uint)

Add an incoming value to the end of a PHI list.

llgo:link (*OpaqueValue).AddIncoming C.LLVMAddIncoming

func (*OpaqueValue) AddTargetDependentFunctionAttr

func (self *OpaqueValue) AddTargetDependentFunctionAttr(A *c.Char, V *c.Char)

Add a target-dependent attribute to a function @see llvm::AttrBuilder::addAttribute()

llgo:link (*OpaqueValue).AddTargetDependentFunctionAttr C.LLVMAddTargetDependentFunctionAttr

func (*OpaqueValue) AggregateElement

func (self *OpaqueValue) AggregateElement(Idx c.Uint) ValueRef

Get element of a constant aggregate (struct, array or vector) at the specified index. Returns null if the index is out of range, or it's not possible to determine the element (e.g., because the constant is a constant expression.)

@see llvm::Constant::getAggregateElement()

llgo:link (*OpaqueValue).AggregateElement C.LLVMGetAggregateElement

func (*OpaqueValue) AliasGetAliasee

func (self *OpaqueValue) AliasGetAliasee() ValueRef

Retrieve the target value of an alias.

llgo:link (*OpaqueValue).AliasGetAliasee C.LLVMAliasGetAliasee

func (*OpaqueValue) Alignment

func (self *OpaqueValue) Alignment() c.Uint

Obtain the preferred alignment of the value. @see llvm::AllocaInst::getAlignment() @see llvm::LoadInst::getAlignment() @see llvm::StoreInst::getAlignment() @see llvm::AtomicRMWInst::setAlignment() @see llvm::AtomicCmpXchgInst::setAlignment() @see llvm::GlobalValue::getAlignment()

llgo:link (*OpaqueValue).Alignment C.LLVMGetAlignment

func (*OpaqueValue) AllocatedType

func (self *OpaqueValue) AllocatedType() TypeRef

Obtain the type that is being allocated by the alloca instruction.

llgo:link (*OpaqueValue).AllocatedType C.LLVMGetAllocatedType

func (*OpaqueValue) AppendBasicBlock

func (self *OpaqueValue) AppendBasicBlock(Name *c.Char) BasicBlockRef

Append a basic block to the end of a function using the global context.

@see llvm::BasicBlock::Create()

llgo:link (*OpaqueValue).AppendBasicBlock C.LLVMAppendBasicBlock

func (*OpaqueValue) AppendExistingBasicBlock

func (self *OpaqueValue) AppendExistingBasicBlock(BB BasicBlockRef)

Append the given basic block to the basic block list of the given function.

@see llvm::Function::BasicBlockListType::push_back()

llgo:link (*OpaqueValue).AppendExistingBasicBlock C.LLVMAppendExistingBasicBlock

func (*OpaqueValue) ArgOperand

func (self *OpaqueValue) ArgOperand(i c.Uint) ValueRef

llgo:link (*OpaqueValue).ArgOperand C.LLVMGetArgOperand

func (*OpaqueValue) AsString

func (self *OpaqueValue) AsString(Length *c.SizeT) *c.Char

Get the given constant data sequential as a string.

@see ConstantDataSequential::getAsString()

llgo:link (*OpaqueValue).AsString C.LLVMGetAsString

func (*OpaqueValue) AtomicRMWBinOp

func (self *OpaqueValue) AtomicRMWBinOp() AtomicRMWBinOp

llgo:link (*OpaqueValue).AtomicRMWBinOp C.LLVMGetAtomicRMWBinOp

func (*OpaqueValue) AtomicSyncScopeID

func (self *OpaqueValue) AtomicSyncScopeID() c.Uint

Returns the synchronization scope ID of an atomic instruction.

llgo:link (*OpaqueValue).AtomicSyncScopeID C.LLVMGetAtomicSyncScopeID

func (*OpaqueValue) AttributeCountAtIndex

func (self *OpaqueValue) AttributeCountAtIndex(Idx AttributeIndex) c.Uint

llgo:link (*OpaqueValue).AttributeCountAtIndex C.LLVMGetAttributeCountAtIndex

func (*OpaqueValue) AttributesAtIndex

func (self *OpaqueValue) AttributesAtIndex(Idx AttributeIndex, Attrs *AttributeRef)

llgo:link (*OpaqueValue).AttributesAtIndex C.LLVMGetAttributesAtIndex

func (*OpaqueValue) BasicBlocks

func (self *OpaqueValue) BasicBlocks(BasicBlocks *BasicBlockRef)

Obtain all of the basic blocks in a function.

This operates on a function value. The BasicBlocks parameter is a pointer to a pre-allocated array of LLVMBasicBlockRef of at least LLVMCountBasicBlocks() in length. This array is populated with LLVMBasicBlockRef instances.

llgo:link (*OpaqueValue).BasicBlocks C.LLVMGetBasicBlocks

func (*OpaqueValue) BlockAddress

func (self *OpaqueValue) BlockAddress(BB BasicBlockRef) ValueRef

llgo:link (*OpaqueValue).BlockAddress C.LLVMBlockAddress

func (*OpaqueValue) BlockAddressBasicBlock

func (self *OpaqueValue) BlockAddressBasicBlock() BasicBlockRef

Gets the basic block associated with a given BlockAddress constant value.

llgo:link (*OpaqueValue).BlockAddressBasicBlock C.LLVMGetBlockAddressBasicBlock

func (*OpaqueValue) BlockAddressFunction

func (self *OpaqueValue) BlockAddressFunction() ValueRef

Gets the function associated with a given BlockAddress constant value.

llgo:link (*OpaqueValue).BlockAddressFunction C.LLVMGetBlockAddressFunction

func (*OpaqueValue) CallBrDefaultDest

func (self *OpaqueValue) CallBrDefaultDest() BasicBlockRef

Get the default destination of a CallBr instruction.

@see llvm::CallBrInst::getDefaultDest()

llgo:link (*OpaqueValue).CallBrDefaultDest C.LLVMGetCallBrDefaultDest

func (*OpaqueValue) CallBrIndirectDest

func (self *OpaqueValue) CallBrIndirectDest(Idx c.Uint) BasicBlockRef

Get the indirect destination of a CallBr instruction at the given index.

@see llvm::CallBrInst::getIndirectDest()

llgo:link (*OpaqueValue).CallBrIndirectDest C.LLVMGetCallBrIndirectDest

func (*OpaqueValue) CallBrNumIndirectDests

func (self *OpaqueValue) CallBrNumIndirectDests() c.Uint

Get the number of indirect destinations of a CallBr instruction.

@see llvm::CallBrInst::getNumIndirectDests()

llgo:link (*OpaqueValue).CallBrNumIndirectDests C.LLVMGetCallBrNumIndirectDests

func (*OpaqueValue) CallSiteAttributeCount

func (self *OpaqueValue) CallSiteAttributeCount(Idx AttributeIndex) c.Uint

llgo:link (*OpaqueValue).CallSiteAttributeCount C.LLVMGetCallSiteAttributeCount

func (*OpaqueValue) CallSiteAttributes

func (self *OpaqueValue) CallSiteAttributes(Idx AttributeIndex, Attrs *AttributeRef)

llgo:link (*OpaqueValue).CallSiteAttributes C.LLVMGetCallSiteAttributes

func (*OpaqueValue) CallSiteEnumAttribute

func (self *OpaqueValue) CallSiteEnumAttribute(Idx AttributeIndex, KindID c.Uint) AttributeRef

llgo:link (*OpaqueValue).CallSiteEnumAttribute C.LLVMGetCallSiteEnumAttribute

func (*OpaqueValue) CallSiteStringAttribute

func (self *OpaqueValue) CallSiteStringAttribute(Idx AttributeIndex, K *c.Char, KLen c.Uint) AttributeRef

llgo:link (*OpaqueValue).CallSiteStringAttribute C.LLVMGetCallSiteStringAttribute

func (*OpaqueValue) CalledFunctionType

func (self *OpaqueValue) CalledFunctionType() TypeRef

Obtain the function type called by this instruction.

@see llvm::CallBase::getFunctionType()

llgo:link (*OpaqueValue).CalledFunctionType C.LLVMGetCalledFunctionType

func (*OpaqueValue) CalledValue

func (self *OpaqueValue) CalledValue() ValueRef

Obtain the pointer to the function invoked by this instruction.

This expects an LLVMValueRef that corresponds to a llvm::CallInst or llvm::InvokeInst.

@see llvm::CallInst::getCalledOperand() @see llvm::InvokeInst::getCalledOperand()

llgo:link (*OpaqueValue).CalledValue C.LLVMGetCalledValue

func (*OpaqueValue) CanValueUseFastMathFlags

func (self *OpaqueValue) CanValueUseFastMathFlags() Bool

Check if a given value can potentially have fast math flags.

Will return true for floating point arithmetic instructions, and for select, phi, and call instructions whose type is a floating point type, or a vector or array thereof. See https://llvm.org/docs/LangRef.html#fast-math-flags

llgo:link (*OpaqueValue).CanValueUseFastMathFlags C.LLVMCanValueUseFastMathFlags

func (*OpaqueValue) CastOpcode

func (self *OpaqueValue) CastOpcode(SrcIsSigned Bool, DestTy TypeRef, DestIsSigned Bool) Opcode

llgo:link (*OpaqueValue).CastOpcode C.LLVMGetCastOpcode

func (*OpaqueValue) Clause

func (self *OpaqueValue) Clause(Idx c.Uint) ValueRef

llgo:link (*OpaqueValue).Clause C.LLVMGetClause

func (*OpaqueValue) CmpXchgFailureOrdering

func (self *OpaqueValue) CmpXchgFailureOrdering() AtomicOrdering

llgo:link (*OpaqueValue).CmpXchgFailureOrdering C.LLVMGetCmpXchgFailureOrdering

func (*OpaqueValue) CmpXchgSuccessOrdering

func (self *OpaqueValue) CmpXchgSuccessOrdering() AtomicOrdering

llgo:link (*OpaqueValue).CmpXchgSuccessOrdering C.LLVMGetCmpXchgSuccessOrdering

func (*OpaqueValue) Comdat

func (self *OpaqueValue) Comdat() ComdatRef

Get the Comdat assigned to the given global object.

@see llvm::GlobalObject::getComdat()

llgo:link (*OpaqueValue).Comdat C.LLVMGetComdat

func (*OpaqueValue) Condition

func (self *OpaqueValue) Condition() ValueRef

Return the condition of a branch instruction.

This only works on llvm::BranchInst instructions.

@see llvm::BranchInst::getCondition

llgo:link (*OpaqueValue).Condition C.LLVMGetCondition

func (*OpaqueValue) ConstAddrSpaceCast

func (self *OpaqueValue) ConstAddrSpaceCast(ToType TypeRef) ValueRef

llgo:link (*OpaqueValue).ConstAddrSpaceCast C.LLVMConstAddrSpaceCast

func (*OpaqueValue) ConstBitCast

func (self *OpaqueValue) ConstBitCast(ToType TypeRef) ValueRef

llgo:link (*OpaqueValue).ConstBitCast C.LLVMConstBitCast

func (*OpaqueValue) ConstInsertElement

func (self *OpaqueValue) ConstInsertElement(ElementValueConstant ValueRef, IndexConstant ValueRef) ValueRef

llgo:link (*OpaqueValue).ConstInsertElement C.LLVMConstInsertElement

func (*OpaqueValue) ConstIntGetSExtValue

func (self *OpaqueValue) ConstIntGetSExtValue() c.LongLong

Obtain the sign extended value for an integer constant value.

@see llvm::ConstantInt::getSExtValue()

llgo:link (*OpaqueValue).ConstIntGetSExtValue C.LLVMConstIntGetSExtValue

func (*OpaqueValue) ConstIntGetZExtValue

func (self *OpaqueValue) ConstIntGetZExtValue() c.UlongLong

Obtain the zero extended value for an integer constant value.

@see llvm::ConstantInt::getZExtValue()

llgo:link (*OpaqueValue).ConstIntGetZExtValue C.LLVMConstIntGetZExtValue

func (*OpaqueValue) ConstIntToPtr

func (self *OpaqueValue) ConstIntToPtr(ToType TypeRef) ValueRef

llgo:link (*OpaqueValue).ConstIntToPtr C.LLVMConstIntToPtr

func (*OpaqueValue) ConstNSWNeg

func (self *OpaqueValue) ConstNSWNeg() ValueRef

llgo:link (*OpaqueValue).ConstNSWNeg C.LLVMConstNSWNeg

func (*OpaqueValue) ConstNUWNeg

func (self *OpaqueValue) ConstNUWNeg() ValueRef

llgo:link (*OpaqueValue).ConstNUWNeg C.LLVMConstNUWNeg

func (*OpaqueValue) ConstNeg

func (self *OpaqueValue) ConstNeg() ValueRef

llgo:link (*OpaqueValue).ConstNeg C.LLVMConstNeg

func (*OpaqueValue) ConstNot

func (self *OpaqueValue) ConstNot() ValueRef

llgo:link (*OpaqueValue).ConstNot C.LLVMConstNot

func (*OpaqueValue) ConstOpcode

func (self *OpaqueValue) ConstOpcode() Opcode

@defgroup LLVMCCoreValueConstantExpressions Constant Expressions

Functions in this group correspond to APIs on llvm::ConstantExpr.

@see llvm::ConstantExpr.

@{

llgo:link (*OpaqueValue).ConstOpcode C.LLVMGetConstOpcode

func (*OpaqueValue) ConstPointerCast

func (self *OpaqueValue) ConstPointerCast(ToType TypeRef) ValueRef

llgo:link (*OpaqueValue).ConstPointerCast C.LLVMConstPointerCast

func (*OpaqueValue) ConstPtrToInt

func (self *OpaqueValue) ConstPtrToInt(ToType TypeRef) ValueRef

llgo:link (*OpaqueValue).ConstPtrToInt C.LLVMConstPtrToInt

func (*OpaqueValue) ConstRealGetDouble

func (self *OpaqueValue) ConstRealGetDouble(losesInfo *Bool) c.Double

Obtain the double value for an floating point constant value. losesInfo indicates if some precision was lost in the conversion.

@see llvm::ConstantFP::getDoubleValue

llgo:link (*OpaqueValue).ConstRealGetDouble C.LLVMConstRealGetDouble

func (*OpaqueValue) ConstShuffleVector

func (self *OpaqueValue) ConstShuffleVector(VectorBConstant ValueRef, MaskConstant ValueRef) ValueRef

llgo:link (*OpaqueValue).ConstShuffleVector C.LLVMConstShuffleVector

func (*OpaqueValue) ConstStruct

func (self *OpaqueValue) ConstStruct(Count c.Uint, Packed Bool) ValueRef

Create a ConstantStruct in the global Context.

This is the same as LLVMConstStructInContext except it operates on the global Context.

@see LLVMConstStructInContext()

llgo:link (*OpaqueValue).ConstStruct C.LLVMConstStruct

func (*OpaqueValue) ConstTrunc

func (self *OpaqueValue) ConstTrunc(ToType TypeRef) ValueRef

llgo:link (*OpaqueValue).ConstTrunc C.LLVMConstTrunc

func (*OpaqueValue) ConstTruncOrBitCast

func (self *OpaqueValue) ConstTruncOrBitCast(ToType TypeRef) ValueRef

llgo:link (*OpaqueValue).ConstTruncOrBitCast C.LLVMConstTruncOrBitCast

func (*OpaqueValue) ConstVector

func (self *OpaqueValue) ConstVector(Size c.Uint) ValueRef

Create a ConstantVector from values.

@see llvm::ConstantVector::get()

llgo:link (*OpaqueValue).ConstVector C.LLVMConstVector

func (*OpaqueValue) ConstantPtrAuth

func (self *OpaqueValue) ConstantPtrAuth(Key ValueRef, Disc ValueRef, AddrDisc ValueRef) ValueRef

Create a ConstantPtrAuth constant with the given values.

@see llvm::ConstantPtrAuth::get()

llgo:link (*OpaqueValue).ConstantPtrAuth C.LLVMConstantPtrAuth

func (*OpaqueValue) ConstantPtrAuthAddrDiscriminator

func (self *OpaqueValue) ConstantPtrAuthAddrDiscriminator() ValueRef

Get the address discriminator value for the associated ConstantPtrAuth constant.

@see llvm::ConstantPtrAuth::getAddrDiscriminator

llgo:link (*OpaqueValue).ConstantPtrAuthAddrDiscriminator C.LLVMGetConstantPtrAuthAddrDiscriminator

func (*OpaqueValue) ConstantPtrAuthDiscriminator

func (self *OpaqueValue) ConstantPtrAuthDiscriminator() ValueRef

Get the discriminator value for the associated ConstantPtrAuth constant.

@see llvm::ConstantPtrAuth::getDiscriminator

llgo:link (*OpaqueValue).ConstantPtrAuthDiscriminator C.LLVMGetConstantPtrAuthDiscriminator

func (*OpaqueValue) ConstantPtrAuthKey

func (self *OpaqueValue) ConstantPtrAuthKey() ValueRef

Get the key value for the associated ConstantPtrAuth constant.

@see llvm::ConstantPtrAuth::getKey

llgo:link (*OpaqueValue).ConstantPtrAuthKey C.LLVMGetConstantPtrAuthKey

func (*OpaqueValue) ConstantPtrAuthPointer

func (self *OpaqueValue) ConstantPtrAuthPointer() ValueRef

Get the pointer value for the associated ConstantPtrAuth constant.

@see llvm::ConstantPtrAuth::getPointer

llgo:link (*OpaqueValue).ConstantPtrAuthPointer C.LLVMGetConstantPtrAuthPointer

func (*OpaqueValue) CountBasicBlocks

func (self *OpaqueValue) CountBasicBlocks() c.Uint

Obtain the number of basic blocks in a function.

@param Fn Function value to operate on.

llgo:link (*OpaqueValue).CountBasicBlocks C.LLVMCountBasicBlocks

func (*OpaqueValue) CountIncoming

func (self *OpaqueValue) CountIncoming() c.Uint

Obtain the number of incoming basic blocks to a PHI node.

llgo:link (*OpaqueValue).CountIncoming C.LLVMCountIncoming

func (*OpaqueValue) CountParams

func (self *OpaqueValue) CountParams() c.Uint

Obtain the number of parameters in a function.

@see llvm::Function::arg_size()

llgo:link (*OpaqueValue).CountParams C.LLVMCountParams

func (*OpaqueValue) DLLStorageClass

func (self *OpaqueValue) DLLStorageClass() DLLStorageClass

llgo:link (*OpaqueValue).DLLStorageClass C.LLVMGetDLLStorageClass

func (*OpaqueValue) DebugLocColumn

func (self *OpaqueValue) DebugLocColumn() c.Uint

Return the column number of the debug location for this value, which must be an llvm::Instruction.

@see llvm::Instruction::getDebugLoc()

llgo:link (*OpaqueValue).DebugLocColumn C.LLVMGetDebugLocColumn

func (*OpaqueValue) DebugLocDirectory

func (self *OpaqueValue) DebugLocDirectory(Length *c.Uint) *c.Char

Return the directory of the debug location for this value, which must be an llvm::Instruction, llvm::GlobalVariable, or llvm::Function.

@see llvm::Instruction::getDebugLoc() @see llvm::GlobalVariable::getDebugInfo() @see llvm::Function::getSubprogram()

llgo:link (*OpaqueValue).DebugLocDirectory C.LLVMGetDebugLocDirectory

func (*OpaqueValue) DebugLocFilename

func (self *OpaqueValue) DebugLocFilename(Length *c.Uint) *c.Char

Return the filename of the debug location for this value, which must be an llvm::Instruction, llvm::GlobalVariable, or llvm::Function.

@see llvm::Instruction::getDebugLoc() @see llvm::GlobalVariable::getDebugInfo() @see llvm::Function::getSubprogram()

llgo:link (*OpaqueValue).DebugLocFilename C.LLVMGetDebugLocFilename

func (*OpaqueValue) DebugLocLine

func (self *OpaqueValue) DebugLocLine() c.Uint

Return the line number of the debug location for this value, which must be an llvm::Instruction, llvm::GlobalVariable, or llvm::Function.

@see llvm::Instruction::getDebugLoc() @see llvm::GlobalVariable::getDebugInfo() @see llvm::Function::getSubprogram()

llgo:link (*OpaqueValue).DebugLocLine C.LLVMGetDebugLocLine

func (*OpaqueValue) DeleteFunction

func (self *OpaqueValue) DeleteFunction()

Remove a function from its containing module and deletes it.

@see llvm::Function::eraseFromParent()

llgo:link (*OpaqueValue).DeleteFunction C.LLVMDeleteFunction

func (*OpaqueValue) DeleteGlobal

func (self *OpaqueValue) DeleteGlobal()

llgo:link (*OpaqueValue).DeleteGlobal C.LLVMDeleteGlobal

func (*OpaqueValue) DeleteInstruction

func (self *OpaqueValue) DeleteInstruction()

Delete an instruction.

The instruction specified is deleted. It must have previously been removed from its containing building block.

@see llvm::Value::deleteValue()

llgo:link (*OpaqueValue).DeleteInstruction C.LLVMDeleteInstruction

func (*OpaqueValue) DumpValue

func (self *OpaqueValue) DumpValue()

Dump a representation of a value to stderr.

@see llvm::Value::dump()

llgo:link (*OpaqueValue).DumpValue C.LLVMDumpValue

func (*OpaqueValue) ElementAsConstant

func (self *OpaqueValue) ElementAsConstant(idx c.Uint) ValueRef

Get an element at specified index as a constant.

@see ConstantDataSequential::getElementAsConstant()

llgo:link (*OpaqueValue).ElementAsConstant C.LLVMGetElementAsConstant

func (*OpaqueValue) EntryBasicBlock

func (self *OpaqueValue) EntryBasicBlock() BasicBlockRef

Obtain the basic block that corresponds to the entry point of a function.

@see llvm::Function::getEntryBlock()

llgo:link (*OpaqueValue).EntryBasicBlock C.LLVMGetEntryBasicBlock

func (*OpaqueValue) EnumAttributeAtIndex

func (self *OpaqueValue) EnumAttributeAtIndex(Idx AttributeIndex, KindID c.Uint) AttributeRef

llgo:link (*OpaqueValue).EnumAttributeAtIndex C.LLVMGetEnumAttributeAtIndex

func (*OpaqueValue) EraseGlobalIFunc

func (self *OpaqueValue) EraseGlobalIFunc()

Remove a global indirect function from its parent module and delete it.

@see llvm::GlobalIFunc::eraseFromParent()

llgo:link (*OpaqueValue).EraseGlobalIFunc C.LLVMEraseGlobalIFunc

func (*OpaqueValue) Exact

func (self *OpaqueValue) Exact() Bool

llgo:link (*OpaqueValue).Exact C.LLVMGetExact

func (*OpaqueValue) FCmpPredicate

func (self *OpaqueValue) FCmpPredicate() RealPredicate

Obtain the float predicate of an instruction.

This is only valid for instructions that correspond to llvm::FCmpInst.

@see llvm::FCmpInst::getPredicate()

llgo:link (*OpaqueValue).FCmpPredicate C.LLVMGetFCmpPredicate

func (*OpaqueValue) FastMathFlags

func (self *OpaqueValue) FastMathFlags() FastMathFlags

Get the flags for which fast-math-style optimizations are allowed for this value.

Only valid on floating point instructions. @see LLVMCanValueUseFastMathFlags

llgo:link (*OpaqueValue).FastMathFlags C.LLVMGetFastMathFlags

func (*OpaqueValue) FirstBasicBlock

func (self *OpaqueValue) FirstBasicBlock() BasicBlockRef

Obtain the first basic block in a function.

The returned basic block can be used as an iterator. You will likely eventually call into LLVMGetNextBasicBlock() with it.

@see llvm::Function::begin()

llgo:link (*OpaqueValue).FirstBasicBlock C.LLVMGetFirstBasicBlock

func (*OpaqueValue) FirstDbgRecord

func (self *OpaqueValue) FirstDbgRecord() DbgRecordRef

Obtain the first debug record attached to an instruction.

Use LLVMGetNextDbgRecord() and LLVMGetPreviousDbgRecord() to traverse the sequence of DbgRecords.

Return the first DbgRecord attached to Inst or NULL if there are none.

@see llvm::Instruction::getDbgRecordRange()

llgo:link (*OpaqueValue).FirstDbgRecord C.LLVMGetFirstDbgRecord

func (*OpaqueValue) FirstParam

func (self *OpaqueValue) FirstParam() ValueRef

Obtain the first parameter to a function.

@see llvm::Function::arg_begin()

llgo:link (*OpaqueValue).FirstParam C.LLVMGetFirstParam

func (*OpaqueValue) FirstUse

func (self *OpaqueValue) FirstUse() UseRef

Obtain the first use of a value.

Uses are obtained in an iterator fashion. First, call this function to obtain a reference to the first use. Then, call LLVMGetNextUse() on that instance and all subsequently obtained instances until LLVMGetNextUse() returns NULL.

@see llvm::Value::use_begin()

llgo:link (*OpaqueValue).FirstUse C.LLVMGetFirstUse

func (*OpaqueValue) FunctionCallConv

func (self *OpaqueValue) FunctionCallConv() c.Uint

Obtain the calling function of a function.

The returned value corresponds to the LLVMCallConv enumeration.

@see llvm::Function::getCallingConv()

llgo:link (*OpaqueValue).FunctionCallConv C.LLVMGetFunctionCallConv

func (*OpaqueValue) GC

func (self *OpaqueValue) GC() *c.Char

Obtain the name of the garbage collector to use during code generation.

@see llvm::Function::getGC()

llgo:link (*OpaqueValue).GC C.LLVMGetGC

func (*OpaqueValue) GEPGetNoWrapFlags

func (self *OpaqueValue) GEPGetNoWrapFlags() GEPNoWrapFlags

Get the no-wrap related flags for the given GEP instruction.

@see llvm::GetElementPtrInst::getNoWrapFlags

llgo:link (*OpaqueValue).GEPGetNoWrapFlags C.LLVMGEPGetNoWrapFlags

func (*OpaqueValue) GEPSetNoWrapFlags

func (self *OpaqueValue) GEPSetNoWrapFlags(NoWrapFlags GEPNoWrapFlags)

Set the no-wrap related flags for the given GEP instruction.

@see llvm::GetElementPtrInst::setNoWrapFlags

llgo:link (*OpaqueValue).GEPSetNoWrapFlags C.LLVMGEPSetNoWrapFlags

func (*OpaqueValue) GEPSourceElementType

func (self *OpaqueValue) GEPSourceElementType() TypeRef

Get the source element type of the given GEP operator.

llgo:link (*OpaqueValue).GEPSourceElementType C.LLVMGetGEPSourceElementType

func (*OpaqueValue) GlobalAddDebugInfo

func (self *OpaqueValue) GlobalAddDebugInfo(GVE MetadataRef)

Add debuginfo metadata to this global.

@see llvm::GlobalVariable::addDebugInfo()

llgo:link (*OpaqueValue).GlobalAddDebugInfo C.LLVMGlobalAddDebugInfo

func (*OpaqueValue) GlobalAddMetadata

func (self *OpaqueValue) GlobalAddMetadata(Kind c.Uint, MD MetadataRef)

Adds a metadata attachment.

@see llvm::GlobalObject::addMetadata()

llgo:link (*OpaqueValue).GlobalAddMetadata C.LLVMGlobalAddMetadata

func (*OpaqueValue) GlobalClearMetadata

func (self *OpaqueValue) GlobalClearMetadata()

Removes all metadata attachments from this value.

@see llvm::GlobalObject::clearMetadata()

llgo:link (*OpaqueValue).GlobalClearMetadata C.LLVMGlobalClearMetadata

func (*OpaqueValue) GlobalCopyAllMetadata

func (self *OpaqueValue) GlobalCopyAllMetadata(NumEntries *c.SizeT) *ValueMetadataEntry

Retrieves an array of metadata entries representing the metadata attached to this value. The caller is responsible for freeing this array by calling \c LLVMDisposeValueMetadataEntries.

@see llvm::GlobalObject::getAllMetadata()

llgo:link (*OpaqueValue).GlobalCopyAllMetadata C.LLVMGlobalCopyAllMetadata

func (*OpaqueValue) GlobalEraseMetadata

func (self *OpaqueValue) GlobalEraseMetadata(Kind c.Uint)

Erases a metadata attachment of the given kind if it exists.

@see llvm::GlobalObject::eraseMetadata()

llgo:link (*OpaqueValue).GlobalEraseMetadata C.LLVMGlobalEraseMetadata

func (*OpaqueValue) GlobalGetValueType

func (self *OpaqueValue) GlobalGetValueType() TypeRef

Returns the "value type" of a global value. This differs from the formal type of a global value which is always a pointer type.

@see llvm::GlobalValue::getValueType() @see llvm::Function::getFunctionType()

llgo:link (*OpaqueValue).GlobalGetValueType C.LLVMGlobalGetValueType

func (*OpaqueValue) GlobalIFuncResolver

func (self *OpaqueValue) GlobalIFuncResolver() ValueRef

Retrieves the resolver function associated with this indirect function, or NULL if it doesn't not exist.

@see llvm::GlobalIFunc::getResolver()

llgo:link (*OpaqueValue).GlobalIFuncResolver C.LLVMGetGlobalIFuncResolver

func (*OpaqueValue) GlobalParent

func (self *OpaqueValue) GlobalParent() ModuleRef

@defgroup LLVMCCoreValueConstantGlobals Global Values

This group contains functions that operate on global values. Functions in this group relate to functions in the llvm::GlobalValue class tree.

@see llvm::GlobalValue

@{

llgo:link (*OpaqueValue).GlobalParent C.LLVMGetGlobalParent

func (*OpaqueValue) GlobalSetMetadata

func (self *OpaqueValue) GlobalSetMetadata(Kind c.Uint, MD MetadataRef)

Sets a metadata attachment, erasing the existing metadata attachment if it already exists for the given kind.

@see llvm::GlobalObject::setMetadata()

llgo:link (*OpaqueValue).GlobalSetMetadata C.LLVMGlobalSetMetadata

func (*OpaqueValue) Handlers

func (self *OpaqueValue) Handlers(Handlers *BasicBlockRef)

Obtain the basic blocks acting as handlers for a catchswitch instruction.

The Handlers parameter should point to a pre-allocated array of LLVMBasicBlockRefs at least LLVMGetNumHandlers() large. On return, the first LLVMGetNumHandlers() entries in the array will be populated with LLVMBasicBlockRef instances.

@param CatchSwitch The catchswitch instruction to operate on. @param Handlers Memory address of an array to be filled with basic blocks.

llgo:link (*OpaqueValue).Handlers C.LLVMGetHandlers

func (*OpaqueValue) HasMetadata

func (self *OpaqueValue) HasMetadata() c.Int

Determine whether an instruction has any metadata attached.

llgo:link (*OpaqueValue).HasMetadata C.LLVMHasMetadata

func (*OpaqueValue) HasPersonalityFn

func (self *OpaqueValue) HasPersonalityFn() Bool

Check whether the given function has a personality function.

@see llvm::Function::hasPersonalityFn()

llgo:link (*OpaqueValue).HasPersonalityFn C.LLVMHasPersonalityFn

func (*OpaqueValue) HasPrefixData

func (self *OpaqueValue) HasPrefixData() Bool

Check if a given function has prefix data. Only valid on functions. See https://llvm.org/docs/LangRef.html#prefix-data

llgo:link (*OpaqueValue).HasPrefixData C.LLVMHasPrefixData

func (*OpaqueValue) HasPrologueData

func (self *OpaqueValue) HasPrologueData() Bool

Check if a given function has prologue data. Only valid on functions. See https://llvm.org/docs/LangRef.html#prologue-data

llgo:link (*OpaqueValue).HasPrologueData C.LLVMHasPrologueData

func (*OpaqueValue) HasUnnamedAddr deprecated

func (self *OpaqueValue) HasUnnamedAddr() Bool

Deprecated: Use LLVMGetUnnamedAddress instead.

llgo:link (*OpaqueValue).HasUnnamedAddr C.LLVMHasUnnamedAddr

func (*OpaqueValue) ICmpPredicate

func (self *OpaqueValue) ICmpPredicate() IntPredicate

Obtain the predicate of an instruction.

This is only valid for instructions that correspond to llvm::ICmpInst.

@see llvm::ICmpInst::getPredicate()

llgo:link (*OpaqueValue).ICmpPredicate C.LLVMGetICmpPredicate

func (*OpaqueValue) ICmpSameSign

func (self *OpaqueValue) ICmpSameSign() Bool

Get whether or not an icmp instruction has the samesign flag.

This is only valid for instructions that correspond to llvm::ICmpInst.

@see llvm::ICmpInst::hasSameSign()

llgo:link (*OpaqueValue).ICmpSameSign C.LLVMGetICmpSameSign

func (*OpaqueValue) IncomingBlock

func (self *OpaqueValue) IncomingBlock(Index c.Uint) BasicBlockRef

Obtain an incoming value to a PHI node as an LLVMBasicBlockRef.

llgo:link (*OpaqueValue).IncomingBlock C.LLVMGetIncomingBlock

func (*OpaqueValue) IncomingValue

func (self *OpaqueValue) IncomingValue(Index c.Uint) ValueRef

Obtain an incoming value to a PHI node as an LLVMValueRef.

llgo:link (*OpaqueValue).IncomingValue C.LLVMGetIncomingValue

func (*OpaqueValue) Indices

func (self *OpaqueValue) Indices() *c.Uint

Obtain the indices as an array.

llgo:link (*OpaqueValue).Indices C.LLVMGetIndices

func (*OpaqueValue) Initializer

func (self *OpaqueValue) Initializer() ValueRef

llgo:link (*OpaqueValue).Initializer C.LLVMGetInitializer

func (*OpaqueValue) InlineAsmAsmString

func (self *OpaqueValue) InlineAsmAsmString(Len *c.SizeT) *c.Char

Get the template string used for an inline assembly snippet

llgo:link (*OpaqueValue).InlineAsmAsmString C.LLVMGetInlineAsmAsmString

func (*OpaqueValue) InlineAsmCanUnwind

func (self *OpaqueValue) InlineAsmCanUnwind() Bool

Get if the inline asm snippet may unwind the stack

llgo:link (*OpaqueValue).InlineAsmCanUnwind C.LLVMGetInlineAsmCanUnwind

func (*OpaqueValue) InlineAsmConstraintString

func (self *OpaqueValue) InlineAsmConstraintString(Len *c.SizeT) *c.Char

Get the raw constraint string for an inline assembly snippet

llgo:link (*OpaqueValue).InlineAsmConstraintString C.LLVMGetInlineAsmConstraintString

func (*OpaqueValue) InlineAsmDialect

func (self *OpaqueValue) InlineAsmDialect() InlineAsmDialect

Get the dialect used by the inline asm snippet

llgo:link (*OpaqueValue).InlineAsmDialect C.LLVMGetInlineAsmDialect

func (*OpaqueValue) InlineAsmFunctionType

func (self *OpaqueValue) InlineAsmFunctionType() TypeRef

Get the function type of the inline assembly snippet. The same type that was passed into LLVMGetInlineAsm originally

@see LLVMGetInlineAsm

llgo:link (*OpaqueValue).InlineAsmFunctionType C.LLVMGetInlineAsmFunctionType

func (*OpaqueValue) InlineAsmHasSideEffects

func (self *OpaqueValue) InlineAsmHasSideEffects() Bool

Get if the inline asm snippet has side effects

llgo:link (*OpaqueValue).InlineAsmHasSideEffects C.LLVMGetInlineAsmHasSideEffects

func (*OpaqueValue) InlineAsmNeedsAlignedStack

func (self *OpaqueValue) InlineAsmNeedsAlignedStack() Bool

Get if the inline asm snippet needs an aligned stack

llgo:link (*OpaqueValue).InlineAsmNeedsAlignedStack C.LLVMGetInlineAsmNeedsAlignedStack

func (*OpaqueValue) InstructionCallConv

func (self *OpaqueValue) InstructionCallConv() c.Uint

Obtain the calling convention for a call instruction.

This is the opposite of LLVMSetInstructionCallConv(). Reads its usage.

@see LLVMSetInstructionCallConv()

llgo:link (*OpaqueValue).InstructionCallConv C.LLVMGetInstructionCallConv

func (*OpaqueValue) InstructionClone

func (self *OpaqueValue) InstructionClone() ValueRef

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

@see llvm::Instruction::clone()

llgo:link (*OpaqueValue).InstructionClone C.LLVMInstructionClone

func (*OpaqueValue) InstructionEraseFromParent

func (self *OpaqueValue) InstructionEraseFromParent()

Remove and delete an instruction.

The instruction specified is removed from its containing building block and then deleted.

@see llvm::Instruction::eraseFromParent()

llgo:link (*OpaqueValue).InstructionEraseFromParent C.LLVMInstructionEraseFromParent

func (*OpaqueValue) InstructionGetAllMetadataOtherThanDebugLoc

func (self *OpaqueValue) InstructionGetAllMetadataOtherThanDebugLoc(NumEntries *c.SizeT) *ValueMetadataEntry

Returns the metadata associated with an instruction value, but filters out all the debug locations.

@see llvm::Instruction::getAllMetadataOtherThanDebugLoc()

llgo:link (*OpaqueValue).InstructionGetAllMetadataOtherThanDebugLoc C.LLVMInstructionGetAllMetadataOtherThanDebugLoc

func (*OpaqueValue) InstructionGetDebugLoc

func (self *OpaqueValue) InstructionGetDebugLoc() MetadataRef

Get the debug location for the given instruction.

@see llvm::Instruction::getDebugLoc()

llgo:link (*OpaqueValue).InstructionGetDebugLoc C.LLVMInstructionGetDebugLoc

func (*OpaqueValue) InstructionOpcode

func (self *OpaqueValue) InstructionOpcode() Opcode

Obtain the code opcode for an individual instruction.

@see llvm::Instruction::getOpCode()

llgo:link (*OpaqueValue).InstructionOpcode C.LLVMGetInstructionOpcode

func (*OpaqueValue) InstructionParent

func (self *OpaqueValue) InstructionParent() BasicBlockRef

Obtain the basic block to which an instruction belongs.

@see llvm::Instruction::getParent()

llgo:link (*OpaqueValue).InstructionParent C.LLVMGetInstructionParent

func (*OpaqueValue) InstructionRemoveFromParent

func (self *OpaqueValue) InstructionRemoveFromParent()

Remove an instruction.

The instruction specified is removed from its containing building block but is kept alive.

@see llvm::Instruction::removeFromParent()

llgo:link (*OpaqueValue).InstructionRemoveFromParent C.LLVMInstructionRemoveFromParent

func (*OpaqueValue) InstructionSetDebugLoc

func (self *OpaqueValue) InstructionSetDebugLoc(Loc MetadataRef)

Set the debug location for the given instruction.

To clear the location metadata of the given instruction, pass NULL to \p Loc.

@see llvm::Instruction::setDebugLoc()

llgo:link (*OpaqueValue).InstructionSetDebugLoc C.LLVMInstructionSetDebugLoc

func (*OpaqueValue) IntrinsicID

func (self *OpaqueValue) IntrinsicID() c.Uint

Obtain the ID number from a function instance.

@see llvm::Function::getIntrinsicID()

llgo:link (*OpaqueValue).IntrinsicID C.LLVMGetIntrinsicID

func (*OpaqueValue) IsAAddrSpaceCastInst

func (self *OpaqueValue) IsAAddrSpaceCastInst() ValueRef

llgo:link (*OpaqueValue).IsAAddrSpaceCastInst C.LLVMIsAAddrSpaceCastInst

func (*OpaqueValue) IsAAllocaInst

func (self *OpaqueValue) IsAAllocaInst() ValueRef

llgo:link (*OpaqueValue).IsAAllocaInst C.LLVMIsAAllocaInst

func (*OpaqueValue) IsAArgument

func (self *OpaqueValue) IsAArgument() ValueRef

llgo:link (*OpaqueValue).IsAArgument C.LLVMIsAArgument

func (*OpaqueValue) IsAAtomicCmpXchgInst

func (self *OpaqueValue) IsAAtomicCmpXchgInst() ValueRef

llgo:link (*OpaqueValue).IsAAtomicCmpXchgInst C.LLVMIsAAtomicCmpXchgInst

func (*OpaqueValue) IsAAtomicRMWInst

func (self *OpaqueValue) IsAAtomicRMWInst() ValueRef

llgo:link (*OpaqueValue).IsAAtomicRMWInst C.LLVMIsAAtomicRMWInst

func (*OpaqueValue) IsABasicBlock

func (self *OpaqueValue) IsABasicBlock() ValueRef

llgo:link (*OpaqueValue).IsABasicBlock C.LLVMIsABasicBlock

func (*OpaqueValue) IsABinaryOperator

func (self *OpaqueValue) IsABinaryOperator() ValueRef

llgo:link (*OpaqueValue).IsABinaryOperator C.LLVMIsABinaryOperator

func (*OpaqueValue) IsABitCastInst

func (self *OpaqueValue) IsABitCastInst() ValueRef

llgo:link (*OpaqueValue).IsABitCastInst C.LLVMIsABitCastInst

func (*OpaqueValue) IsABlockAddress

func (self *OpaqueValue) IsABlockAddress() ValueRef

llgo:link (*OpaqueValue).IsABlockAddress C.LLVMIsABlockAddress

func (*OpaqueValue) IsABranchInst

func (self *OpaqueValue) IsABranchInst() ValueRef

llgo:link (*OpaqueValue).IsABranchInst C.LLVMIsABranchInst

func (*OpaqueValue) IsACallBrInst

func (self *OpaqueValue) IsACallBrInst() ValueRef

llgo:link (*OpaqueValue).IsACallBrInst C.LLVMIsACallBrInst

func (*OpaqueValue) IsACallInst

func (self *OpaqueValue) IsACallInst() ValueRef

llgo:link (*OpaqueValue).IsACallInst C.LLVMIsACallInst

func (*OpaqueValue) IsACastInst

func (self *OpaqueValue) IsACastInst() ValueRef

llgo:link (*OpaqueValue).IsACastInst C.LLVMIsACastInst

func (*OpaqueValue) IsACatchPadInst

func (self *OpaqueValue) IsACatchPadInst() ValueRef

llgo:link (*OpaqueValue).IsACatchPadInst C.LLVMIsACatchPadInst

func (*OpaqueValue) IsACatchReturnInst

func (self *OpaqueValue) IsACatchReturnInst() ValueRef

llgo:link (*OpaqueValue).IsACatchReturnInst C.LLVMIsACatchReturnInst

func (*OpaqueValue) IsACatchSwitchInst

func (self *OpaqueValue) IsACatchSwitchInst() ValueRef

llgo:link (*OpaqueValue).IsACatchSwitchInst C.LLVMIsACatchSwitchInst

func (*OpaqueValue) IsACleanupPadInst

func (self *OpaqueValue) IsACleanupPadInst() ValueRef

llgo:link (*OpaqueValue).IsACleanupPadInst C.LLVMIsACleanupPadInst

func (*OpaqueValue) IsACleanupReturnInst

func (self *OpaqueValue) IsACleanupReturnInst() ValueRef

llgo:link (*OpaqueValue).IsACleanupReturnInst C.LLVMIsACleanupReturnInst

func (*OpaqueValue) IsACmpInst

func (self *OpaqueValue) IsACmpInst() ValueRef

llgo:link (*OpaqueValue).IsACmpInst C.LLVMIsACmpInst

func (*OpaqueValue) IsAConstant

func (self *OpaqueValue) IsAConstant() ValueRef

llgo:link (*OpaqueValue).IsAConstant C.LLVMIsAConstant

func (*OpaqueValue) IsAConstantAggregateZero

func (self *OpaqueValue) IsAConstantAggregateZero() ValueRef

llgo:link (*OpaqueValue).IsAConstantAggregateZero C.LLVMIsAConstantAggregateZero

func (*OpaqueValue) IsAConstantArray

func (self *OpaqueValue) IsAConstantArray() ValueRef

llgo:link (*OpaqueValue).IsAConstantArray C.LLVMIsAConstantArray

func (*OpaqueValue) IsAConstantDataArray

func (self *OpaqueValue) IsAConstantDataArray() ValueRef

llgo:link (*OpaqueValue).IsAConstantDataArray C.LLVMIsAConstantDataArray

func (*OpaqueValue) IsAConstantDataSequential

func (self *OpaqueValue) IsAConstantDataSequential() ValueRef

llgo:link (*OpaqueValue).IsAConstantDataSequential C.LLVMIsAConstantDataSequential

func (*OpaqueValue) IsAConstantDataVector

func (self *OpaqueValue) IsAConstantDataVector() ValueRef

llgo:link (*OpaqueValue).IsAConstantDataVector C.LLVMIsAConstantDataVector

func (*OpaqueValue) IsAConstantExpr

func (self *OpaqueValue) IsAConstantExpr() ValueRef

llgo:link (*OpaqueValue).IsAConstantExpr C.LLVMIsAConstantExpr

func (*OpaqueValue) IsAConstantFP

func (self *OpaqueValue) IsAConstantFP() ValueRef

llgo:link (*OpaqueValue).IsAConstantFP C.LLVMIsAConstantFP

func (*OpaqueValue) IsAConstantInt

func (self *OpaqueValue) IsAConstantInt() ValueRef

llgo:link (*OpaqueValue).IsAConstantInt C.LLVMIsAConstantInt

func (*OpaqueValue) IsAConstantPointerNull

func (self *OpaqueValue) IsAConstantPointerNull() ValueRef

llgo:link (*OpaqueValue).IsAConstantPointerNull C.LLVMIsAConstantPointerNull

func (*OpaqueValue) IsAConstantPtrAuth

func (self *OpaqueValue) IsAConstantPtrAuth() ValueRef

llgo:link (*OpaqueValue).IsAConstantPtrAuth C.LLVMIsAConstantPtrAuth

func (*OpaqueValue) IsAConstantStruct

func (self *OpaqueValue) IsAConstantStruct() ValueRef

llgo:link (*OpaqueValue).IsAConstantStruct C.LLVMIsAConstantStruct

func (*OpaqueValue) IsAConstantTokenNone

func (self *OpaqueValue) IsAConstantTokenNone() ValueRef

llgo:link (*OpaqueValue).IsAConstantTokenNone C.LLVMIsAConstantTokenNone

func (*OpaqueValue) IsAConstantVector

func (self *OpaqueValue) IsAConstantVector() ValueRef

llgo:link (*OpaqueValue).IsAConstantVector C.LLVMIsAConstantVector

func (*OpaqueValue) IsADbgDeclareInst

func (self *OpaqueValue) IsADbgDeclareInst() ValueRef

llgo:link (*OpaqueValue).IsADbgDeclareInst C.LLVMIsADbgDeclareInst

func (*OpaqueValue) IsADbgInfoIntrinsic

func (self *OpaqueValue) IsADbgInfoIntrinsic() ValueRef

llgo:link (*OpaqueValue).IsADbgInfoIntrinsic C.LLVMIsADbgInfoIntrinsic

func (*OpaqueValue) IsADbgLabelInst

func (self *OpaqueValue) IsADbgLabelInst() ValueRef

llgo:link (*OpaqueValue).IsADbgLabelInst C.LLVMIsADbgLabelInst

func (*OpaqueValue) IsADbgVariableIntrinsic

func (self *OpaqueValue) IsADbgVariableIntrinsic() ValueRef

llgo:link (*OpaqueValue).IsADbgVariableIntrinsic C.LLVMIsADbgVariableIntrinsic

func (*OpaqueValue) IsAExtractElementInst

func (self *OpaqueValue) IsAExtractElementInst() ValueRef

llgo:link (*OpaqueValue).IsAExtractElementInst C.LLVMIsAExtractElementInst

func (*OpaqueValue) IsAExtractValueInst

func (self *OpaqueValue) IsAExtractValueInst() ValueRef

llgo:link (*OpaqueValue).IsAExtractValueInst C.LLVMIsAExtractValueInst

func (*OpaqueValue) IsAFCmpInst

func (self *OpaqueValue) IsAFCmpInst() ValueRef

llgo:link (*OpaqueValue).IsAFCmpInst C.LLVMIsAFCmpInst

func (*OpaqueValue) IsAFPExtInst

func (self *OpaqueValue) IsAFPExtInst() ValueRef

llgo:link (*OpaqueValue).IsAFPExtInst C.LLVMIsAFPExtInst

func (*OpaqueValue) IsAFPToSIInst

func (self *OpaqueValue) IsAFPToSIInst() ValueRef

llgo:link (*OpaqueValue).IsAFPToSIInst C.LLVMIsAFPToSIInst

func (*OpaqueValue) IsAFPToUIInst

func (self *OpaqueValue) IsAFPToUIInst() ValueRef

llgo:link (*OpaqueValue).IsAFPToUIInst C.LLVMIsAFPToUIInst

func (*OpaqueValue) IsAFPTruncInst

func (self *OpaqueValue) IsAFPTruncInst() ValueRef

llgo:link (*OpaqueValue).IsAFPTruncInst C.LLVMIsAFPTruncInst

func (*OpaqueValue) IsAFenceInst

func (self *OpaqueValue) IsAFenceInst() ValueRef

llgo:link (*OpaqueValue).IsAFenceInst C.LLVMIsAFenceInst

func (*OpaqueValue) IsAFreezeInst

func (self *OpaqueValue) IsAFreezeInst() ValueRef

llgo:link (*OpaqueValue).IsAFreezeInst C.LLVMIsAFreezeInst

func (*OpaqueValue) IsAFuncletPadInst

func (self *OpaqueValue) IsAFuncletPadInst() ValueRef

llgo:link (*OpaqueValue).IsAFuncletPadInst C.LLVMIsAFuncletPadInst

func (*OpaqueValue) IsAFunction

func (self *OpaqueValue) IsAFunction() ValueRef

llgo:link (*OpaqueValue).IsAFunction C.LLVMIsAFunction

func (*OpaqueValue) IsAGetElementPtrInst

func (self *OpaqueValue) IsAGetElementPtrInst() ValueRef

llgo:link (*OpaqueValue).IsAGetElementPtrInst C.LLVMIsAGetElementPtrInst

func (*OpaqueValue) IsAGlobalAlias

func (self *OpaqueValue) IsAGlobalAlias() ValueRef

llgo:link (*OpaqueValue).IsAGlobalAlias C.LLVMIsAGlobalAlias

func (*OpaqueValue) IsAGlobalIFunc

func (self *OpaqueValue) IsAGlobalIFunc() ValueRef

llgo:link (*OpaqueValue).IsAGlobalIFunc C.LLVMIsAGlobalIFunc

func (*OpaqueValue) IsAGlobalObject

func (self *OpaqueValue) IsAGlobalObject() ValueRef

llgo:link (*OpaqueValue).IsAGlobalObject C.LLVMIsAGlobalObject

func (*OpaqueValue) IsAGlobalValue

func (self *OpaqueValue) IsAGlobalValue() ValueRef

llgo:link (*OpaqueValue).IsAGlobalValue C.LLVMIsAGlobalValue

func (*OpaqueValue) IsAGlobalVariable

func (self *OpaqueValue) IsAGlobalVariable() ValueRef

llgo:link (*OpaqueValue).IsAGlobalVariable C.LLVMIsAGlobalVariable

func (*OpaqueValue) IsAICmpInst

func (self *OpaqueValue) IsAICmpInst() ValueRef

llgo:link (*OpaqueValue).IsAICmpInst C.LLVMIsAICmpInst

func (*OpaqueValue) IsAIndirectBrInst

func (self *OpaqueValue) IsAIndirectBrInst() ValueRef

llgo:link (*OpaqueValue).IsAIndirectBrInst C.LLVMIsAIndirectBrInst

func (*OpaqueValue) IsAInlineAsm

func (self *OpaqueValue) IsAInlineAsm() ValueRef

llgo:link (*OpaqueValue).IsAInlineAsm C.LLVMIsAInlineAsm

func (*OpaqueValue) IsAInsertElementInst

func (self *OpaqueValue) IsAInsertElementInst() ValueRef

llgo:link (*OpaqueValue).IsAInsertElementInst C.LLVMIsAInsertElementInst

func (*OpaqueValue) IsAInsertValueInst

func (self *OpaqueValue) IsAInsertValueInst() ValueRef

llgo:link (*OpaqueValue).IsAInsertValueInst C.LLVMIsAInsertValueInst

func (*OpaqueValue) IsAInstruction

func (self *OpaqueValue) IsAInstruction() ValueRef

llgo:link (*OpaqueValue).IsAInstruction C.LLVMIsAInstruction

func (*OpaqueValue) IsAIntToPtrInst

func (self *OpaqueValue) IsAIntToPtrInst() ValueRef

llgo:link (*OpaqueValue).IsAIntToPtrInst C.LLVMIsAIntToPtrInst

func (*OpaqueValue) IsAIntrinsicInst

func (self *OpaqueValue) IsAIntrinsicInst() ValueRef

llgo:link (*OpaqueValue).IsAIntrinsicInst C.LLVMIsAIntrinsicInst

func (*OpaqueValue) IsAInvokeInst

func (self *OpaqueValue) IsAInvokeInst() ValueRef

llgo:link (*OpaqueValue).IsAInvokeInst C.LLVMIsAInvokeInst

func (*OpaqueValue) IsALandingPadInst

func (self *OpaqueValue) IsALandingPadInst() ValueRef

llgo:link (*OpaqueValue).IsALandingPadInst C.LLVMIsALandingPadInst

func (*OpaqueValue) IsALoadInst

func (self *OpaqueValue) IsALoadInst() ValueRef

llgo:link (*OpaqueValue).IsALoadInst C.LLVMIsALoadInst

func (*OpaqueValue) IsAMDNode

func (self *OpaqueValue) IsAMDNode() ValueRef

llgo:link (*OpaqueValue).IsAMDNode C.LLVMIsAMDNode

func (*OpaqueValue) IsAMDString

func (self *OpaqueValue) IsAMDString() ValueRef

llgo:link (*OpaqueValue).IsAMDString C.LLVMIsAMDString

func (*OpaqueValue) IsAMemCpyInst

func (self *OpaqueValue) IsAMemCpyInst() ValueRef

llgo:link (*OpaqueValue).IsAMemCpyInst C.LLVMIsAMemCpyInst

func (*OpaqueValue) IsAMemIntrinsic

func (self *OpaqueValue) IsAMemIntrinsic() ValueRef

llgo:link (*OpaqueValue).IsAMemIntrinsic C.LLVMIsAMemIntrinsic

func (*OpaqueValue) IsAMemMoveInst

func (self *OpaqueValue) IsAMemMoveInst() ValueRef

llgo:link (*OpaqueValue).IsAMemMoveInst C.LLVMIsAMemMoveInst

func (*OpaqueValue) IsAMemSetInst

func (self *OpaqueValue) IsAMemSetInst() ValueRef

llgo:link (*OpaqueValue).IsAMemSetInst C.LLVMIsAMemSetInst

func (*OpaqueValue) IsAPHINode

func (self *OpaqueValue) IsAPHINode() ValueRef

llgo:link (*OpaqueValue).IsAPHINode C.LLVMIsAPHINode

func (*OpaqueValue) IsAPoisonValue

func (self *OpaqueValue) IsAPoisonValue() ValueRef

llgo:link (*OpaqueValue).IsAPoisonValue C.LLVMIsAPoisonValue

func (*OpaqueValue) IsAPtrToIntInst

func (self *OpaqueValue) IsAPtrToIntInst() ValueRef

llgo:link (*OpaqueValue).IsAPtrToIntInst C.LLVMIsAPtrToIntInst

func (*OpaqueValue) IsAResumeInst

func (self *OpaqueValue) IsAResumeInst() ValueRef

llgo:link (*OpaqueValue).IsAResumeInst C.LLVMIsAResumeInst

func (*OpaqueValue) IsAReturnInst

func (self *OpaqueValue) IsAReturnInst() ValueRef

llgo:link (*OpaqueValue).IsAReturnInst C.LLVMIsAReturnInst

func (*OpaqueValue) IsASExtInst

func (self *OpaqueValue) IsASExtInst() ValueRef

llgo:link (*OpaqueValue).IsASExtInst C.LLVMIsASExtInst

func (*OpaqueValue) IsASIToFPInst

func (self *OpaqueValue) IsASIToFPInst() ValueRef

llgo:link (*OpaqueValue).IsASIToFPInst C.LLVMIsASIToFPInst

func (*OpaqueValue) IsASelectInst

func (self *OpaqueValue) IsASelectInst() ValueRef

llgo:link (*OpaqueValue).IsASelectInst C.LLVMIsASelectInst

func (*OpaqueValue) IsAShuffleVectorInst

func (self *OpaqueValue) IsAShuffleVectorInst() ValueRef

llgo:link (*OpaqueValue).IsAShuffleVectorInst C.LLVMIsAShuffleVectorInst

func (*OpaqueValue) IsAStoreInst

func (self *OpaqueValue) IsAStoreInst() ValueRef

llgo:link (*OpaqueValue).IsAStoreInst C.LLVMIsAStoreInst

func (*OpaqueValue) IsASwitchInst

func (self *OpaqueValue) IsASwitchInst() ValueRef

llgo:link (*OpaqueValue).IsASwitchInst C.LLVMIsASwitchInst

func (*OpaqueValue) IsATerminatorInst

func (self *OpaqueValue) IsATerminatorInst() ValueRef

Determine whether an instruction is a terminator. This routine is named to be compatible with historical functions that did this by querying the underlying C++ type.

@see llvm::Instruction::isTerminator()

llgo:link (*OpaqueValue).IsATerminatorInst C.LLVMIsATerminatorInst

func (*OpaqueValue) IsATruncInst

func (self *OpaqueValue) IsATruncInst() ValueRef

llgo:link (*OpaqueValue).IsATruncInst C.LLVMIsATruncInst

func (*OpaqueValue) IsAUIToFPInst

func (self *OpaqueValue) IsAUIToFPInst() ValueRef

llgo:link (*OpaqueValue).IsAUIToFPInst C.LLVMIsAUIToFPInst

func (*OpaqueValue) IsAUnaryInstruction

func (self *OpaqueValue) IsAUnaryInstruction() ValueRef

llgo:link (*OpaqueValue).IsAUnaryInstruction C.LLVMIsAUnaryInstruction

func (*OpaqueValue) IsAUnaryOperator

func (self *OpaqueValue) IsAUnaryOperator() ValueRef

llgo:link (*OpaqueValue).IsAUnaryOperator C.LLVMIsAUnaryOperator

func (*OpaqueValue) IsAUndefValue

func (self *OpaqueValue) IsAUndefValue() ValueRef

llgo:link (*OpaqueValue).IsAUndefValue C.LLVMIsAUndefValue

func (*OpaqueValue) IsAUnreachableInst

func (self *OpaqueValue) IsAUnreachableInst() ValueRef

llgo:link (*OpaqueValue).IsAUnreachableInst C.LLVMIsAUnreachableInst

func (*OpaqueValue) IsAUser

func (self *OpaqueValue) IsAUser() ValueRef

llgo:link (*OpaqueValue).IsAUser C.LLVMIsAUser

func (*OpaqueValue) IsAVAArgInst

func (self *OpaqueValue) IsAVAArgInst() ValueRef

llgo:link (*OpaqueValue).IsAVAArgInst C.LLVMIsAVAArgInst

func (*OpaqueValue) IsAValueAsMetadata

func (self *OpaqueValue) IsAValueAsMetadata() ValueRef

llgo:link (*OpaqueValue).IsAValueAsMetadata C.LLVMIsAValueAsMetadata

func (*OpaqueValue) IsAZExtInst

func (self *OpaqueValue) IsAZExtInst() ValueRef

llgo:link (*OpaqueValue).IsAZExtInst C.LLVMIsAZExtInst

func (*OpaqueValue) IsAtomic

func (self *OpaqueValue) IsAtomic() Bool

Returns whether an instruction is an atomic instruction, e.g., atomicrmw, cmpxchg, fence, or loads and stores with atomic ordering.

llgo:link (*OpaqueValue).IsAtomic C.LLVMIsAtomic

func (*OpaqueValue) IsAtomicSingleThread

func (self *OpaqueValue) IsAtomicSingleThread() Bool

llgo:link (*OpaqueValue).IsAtomicSingleThread C.LLVMIsAtomicSingleThread

func (*OpaqueValue) IsCleanup

func (self *OpaqueValue) IsCleanup() Bool

llgo:link (*OpaqueValue).IsCleanup C.LLVMIsCleanup

func (*OpaqueValue) IsConditional

func (self *OpaqueValue) IsConditional() Bool

Return if a branch is conditional.

This only works on llvm::BranchInst instructions.

@see llvm::BranchInst::isConditional

llgo:link (*OpaqueValue).IsConditional C.LLVMIsConditional

func (*OpaqueValue) IsConstant

func (self *OpaqueValue) IsConstant() Bool

Determine whether the specified value instance is constant.

llgo:link (*OpaqueValue).IsConstant C.LLVMIsConstant

func (*OpaqueValue) IsConstantString

func (self *OpaqueValue) IsConstantString() Bool

Returns true if the specified constant is an array of i8.

@see ConstantDataSequential::getAsString()

llgo:link (*OpaqueValue).IsConstantString C.LLVMIsConstantString

func (*OpaqueValue) IsDeclaration

func (self *OpaqueValue) IsDeclaration() Bool

llgo:link (*OpaqueValue).IsDeclaration C.LLVMIsDeclaration

func (*OpaqueValue) IsDisjoint

func (self *OpaqueValue) IsDisjoint() Bool

Gets whether the instruction has the disjoint flag set. Only valid for or instructions.

llgo:link (*OpaqueValue).IsDisjoint C.LLVMGetIsDisjoint

func (*OpaqueValue) IsExternallyInitialized

func (self *OpaqueValue) IsExternallyInitialized() Bool

llgo:link (*OpaqueValue).IsExternallyInitialized C.LLVMIsExternallyInitialized

func (*OpaqueValue) IsGlobalConstant

func (self *OpaqueValue) IsGlobalConstant() Bool

llgo:link (*OpaqueValue).IsGlobalConstant C.LLVMIsGlobalConstant

func (*OpaqueValue) IsInBounds

func (self *OpaqueValue) IsInBounds() Bool

Check whether the given GEP operator is inbounds.

llgo:link (*OpaqueValue).IsInBounds C.LLVMIsInBounds

func (*OpaqueValue) IsNull

func (self *OpaqueValue) IsNull() Bool

Determine whether a value instance is null.

@see llvm::Constant::isNullValue()

llgo:link (*OpaqueValue).IsNull C.LLVMIsNull

func (*OpaqueValue) IsPoison

func (self *OpaqueValue) IsPoison() Bool

Determine whether a value instance is poisonous.

llgo:link (*OpaqueValue).IsPoison C.LLVMIsPoison

func (*OpaqueValue) IsTailCall

func (self *OpaqueValue) IsTailCall() Bool

Obtain whether a call instruction is a tail call.

This only works on llvm::CallInst instructions.

@see llvm::CallInst::isTailCall()

llgo:link (*OpaqueValue).IsTailCall C.LLVMIsTailCall

func (*OpaqueValue) IsThreadLocal

func (self *OpaqueValue) IsThreadLocal() Bool

llgo:link (*OpaqueValue).IsThreadLocal C.LLVMIsThreadLocal

func (*OpaqueValue) IsUndef

func (self *OpaqueValue) IsUndef() Bool

Determine whether a value instance is undefined.

llgo:link (*OpaqueValue).IsUndef C.LLVMIsUndef

func (*OpaqueValue) LastBasicBlock

func (self *OpaqueValue) LastBasicBlock() BasicBlockRef

Obtain the last basic block in a function.

@see llvm::Function::end()

llgo:link (*OpaqueValue).LastBasicBlock C.LLVMGetLastBasicBlock

func (*OpaqueValue) LastDbgRecord

func (self *OpaqueValue) LastDbgRecord() DbgRecordRef

Obtain the last debug record attached to an instruction.

Return the last DbgRecord attached to Inst or NULL if there are none.

@see llvm::Instruction::getDbgRecordRange()

llgo:link (*OpaqueValue).LastDbgRecord C.LLVMGetLastDbgRecord

func (*OpaqueValue) LastParam

func (self *OpaqueValue) LastParam() ValueRef

Obtain the last parameter to a function.

@see llvm::Function::arg_end()

llgo:link (*OpaqueValue).LastParam C.LLVMGetLastParam

func (*OpaqueValue) Linkage

func (self *OpaqueValue) Linkage() Linkage

llgo:link (*OpaqueValue).Linkage C.LLVMGetLinkage

func (*OpaqueValue) MDNode deprecated

func (self *OpaqueValue) MDNode(Count c.Uint) ValueRef

Deprecated: Use LLVMMDNodeInContext2 instead.

llgo:link (*OpaqueValue).MDNode C.LLVMMDNode

func (*OpaqueValue) MDNodeNumOperands

func (self *OpaqueValue) MDNodeNumOperands() c.Uint

Obtain the number of operands from an MDNode value.

@param V MDNode to get number of operands from. @return Number of operands of the MDNode.

llgo:link (*OpaqueValue).MDNodeNumOperands C.LLVMGetMDNodeNumOperands

func (*OpaqueValue) MDNodeOperands

func (self *OpaqueValue) MDNodeOperands(Dest *ValueRef)

Obtain the given MDNode's operands.

The passed LLVMValueRef pointer should point to enough memory to hold all of the operands of the given MDNode (see LLVMGetMDNodeNumOperands) as LLVMValueRefs. This memory will be populated with the LLVMValueRefs of the MDNode's operands.

@param V MDNode to get the operands from. @param Dest Destination array for operands.

llgo:link (*OpaqueValue).MDNodeOperands C.LLVMGetMDNodeOperands

func (*OpaqueValue) MDString

func (self *OpaqueValue) MDString(Length *c.Uint) *c.Char

Obtain the underlying string from a MDString value.

@param V Instance to obtain string from. @param Length Memory address which will hold length of returned string. @return String data in MDString.

llgo:link (*OpaqueValue).MDString C.LLVMGetMDString

func (*OpaqueValue) MaskValue

func (self *OpaqueValue) MaskValue(Elt c.Uint) c.Int

Get the mask value at position Elt in the mask of a ShuffleVector instruction.

\Returns the result of \c LLVMGetUndefMaskElem() if the mask value is poison at that position.

llgo:link (*OpaqueValue).MaskValue C.LLVMGetMaskValue

func (*OpaqueValue) Metadata

func (self *OpaqueValue) Metadata(KindID c.Uint) ValueRef

Return metadata associated with an instruction value.

llgo:link (*OpaqueValue).Metadata C.LLVMGetMetadata

func (*OpaqueValue) NNeg

func (self *OpaqueValue) NNeg() Bool

Gets if the instruction has the non-negative flag set. Only valid for zext instructions.

llgo:link (*OpaqueValue).NNeg C.LLVMGetNNeg

func (*OpaqueValue) NSW

func (self *OpaqueValue) NSW() Bool

llgo:link (*OpaqueValue).NSW C.LLVMGetNSW

func (*OpaqueValue) NUW

func (self *OpaqueValue) NUW() Bool

llgo:link (*OpaqueValue).NUW C.LLVMGetNUW

func (*OpaqueValue) NextFunction

func (self *OpaqueValue) NextFunction() ValueRef

Advance a Function iterator to the next Function.

Returns NULL if the iterator was already at the end and there are no more functions.

llgo:link (*OpaqueValue).NextFunction C.LLVMGetNextFunction

func (*OpaqueValue) NextGlobal

func (self *OpaqueValue) NextGlobal() ValueRef

llgo:link (*OpaqueValue).NextGlobal C.LLVMGetNextGlobal

func (*OpaqueValue) NextGlobalAlias

func (self *OpaqueValue) NextGlobalAlias() ValueRef

Advance a GlobalAlias iterator to the next GlobalAlias.

Returns NULL if the iterator was already at the end and there are no more global aliases.

llgo:link (*OpaqueValue).NextGlobalAlias C.LLVMGetNextGlobalAlias

func (*OpaqueValue) NextGlobalIFunc

func (self *OpaqueValue) NextGlobalIFunc() ValueRef

Advance a GlobalIFunc iterator to the next GlobalIFunc.

Returns NULL if the iterator was already at the end and there are no more global aliases.

llgo:link (*OpaqueValue).NextGlobalIFunc C.LLVMGetNextGlobalIFunc

func (*OpaqueValue) NextInstruction

func (self *OpaqueValue) NextInstruction() ValueRef

Obtain the instruction that occurs after the one specified.

The next instruction will be from the same basic block.

If this is the last instruction in a basic block, NULL will be returned.

llgo:link (*OpaqueValue).NextInstruction C.LLVMGetNextInstruction

func (*OpaqueValue) NextParam

func (self *OpaqueValue) NextParam() ValueRef

Obtain the next parameter to a function.

This takes an LLVMValueRef obtained from LLVMGetFirstParam() (which is actually a wrapped iterator) and obtains the next parameter from the underlying iterator.

llgo:link (*OpaqueValue).NextParam C.LLVMGetNextParam

func (*OpaqueValue) NormalDest

func (self *OpaqueValue) NormalDest() BasicBlockRef

Return the normal destination basic block.

This only works on llvm::InvokeInst instructions.

@see llvm::InvokeInst::getNormalDest()

llgo:link (*OpaqueValue).NormalDest C.LLVMGetNormalDest

func (*OpaqueValue) NumArgOperands

func (self *OpaqueValue) NumArgOperands() c.Uint

Obtain the argument count for a call instruction.

This expects an LLVMValueRef that corresponds to a llvm::CallInst, llvm::InvokeInst, or llvm:FuncletPadInst.

@see llvm::CallInst::getNumArgOperands() @see llvm::InvokeInst::getNumArgOperands() @see llvm::FuncletPadInst::getNumArgOperands()

llgo:link (*OpaqueValue).NumArgOperands C.LLVMGetNumArgOperands

func (*OpaqueValue) NumClauses

func (self *OpaqueValue) NumClauses() c.Uint

llgo:link (*OpaqueValue).NumClauses C.LLVMGetNumClauses

func (*OpaqueValue) NumHandlers

func (self *OpaqueValue) NumHandlers() c.Uint

llgo:link (*OpaqueValue).NumHandlers C.LLVMGetNumHandlers

func (*OpaqueValue) NumIndices

func (self *OpaqueValue) NumIndices() c.Uint

Obtain the number of indices. NB: This also works on GEP operators.

llgo:link (*OpaqueValue).NumIndices C.LLVMGetNumIndices

func (*OpaqueValue) NumMaskElements

func (self *OpaqueValue) NumMaskElements() c.Uint

Get the number of elements in the mask of a ShuffleVector instruction.

llgo:link (*OpaqueValue).NumMaskElements C.LLVMGetNumMaskElements

func (*OpaqueValue) NumOperandBundles

func (self *OpaqueValue) NumOperandBundles() c.Uint

Obtain the number of operand bundles attached to this instruction.

This only works on llvm::CallInst and llvm::InvokeInst instructions.

@see llvm::CallBase::getNumOperandBundles()

llgo:link (*OpaqueValue).NumOperandBundles C.LLVMGetNumOperandBundles

func (*OpaqueValue) NumOperands

func (self *OpaqueValue) NumOperands() c.Int

Obtain the number of operands in a llvm::User value.

@see llvm::User::getNumOperands()

llgo:link (*OpaqueValue).NumOperands C.LLVMGetNumOperands

func (*OpaqueValue) NumSuccessors

func (self *OpaqueValue) NumSuccessors() c.Uint

Return the number of successors that this terminator has.

@see llvm::Instruction::getNumSuccessors

llgo:link (*OpaqueValue).NumSuccessors C.LLVMGetNumSuccessors

func (*OpaqueValue) Operand

func (self *OpaqueValue) Operand(Index c.Uint) ValueRef

Obtain an operand at a specific index in a llvm::User value.

@see llvm::User::getOperand()

llgo:link (*OpaqueValue).Operand C.LLVMGetOperand

func (*OpaqueValue) OperandBundleAtIndex

func (self *OpaqueValue) OperandBundleAtIndex(Index c.Uint) OperandBundleRef

Obtain the operand bundle attached to this instruction at the given index. Use LLVMDisposeOperandBundle to free the operand bundle.

This only works on llvm::CallInst and llvm::InvokeInst instructions.

llgo:link (*OpaqueValue).OperandBundleAtIndex C.LLVMGetOperandBundleAtIndex

func (*OpaqueValue) OperandUse

func (self *OpaqueValue) OperandUse(Index c.Uint) UseRef

Obtain the use of an operand at a specific index in a llvm::User value.

@see llvm::User::getOperandUse()

llgo:link (*OpaqueValue).OperandUse C.LLVMGetOperandUse

func (*OpaqueValue) Ordering

func (self *OpaqueValue) Ordering() AtomicOrdering

llgo:link (*OpaqueValue).Ordering C.LLVMGetOrdering

func (*OpaqueValue) Param

func (self *OpaqueValue) Param(Index c.Uint) ValueRef

Obtain the parameter at the specified index.

Parameters are indexed from 0.

@see llvm::Function::arg_begin()

llgo:link (*OpaqueValue).Param C.LLVMGetParam

func (*OpaqueValue) ParamParent

func (self *OpaqueValue) ParamParent() ValueRef

Obtain the function to which this argument belongs.

Unlike other functions in this group, this one takes an LLVMValueRef that corresponds to a llvm::Attribute.

The returned LLVMValueRef is the llvm::Function to which this argument belongs.

llgo:link (*OpaqueValue).ParamParent C.LLVMGetParamParent

func (*OpaqueValue) Params

func (self *OpaqueValue) Params(Params *ValueRef)

Obtain the parameters in a function.

The takes a pointer to a pre-allocated array of LLVMValueRef that is at least LLVMCountParams() long. This array will be filled with LLVMValueRef instances which correspond to the parameters the function receives. Each LLVMValueRef corresponds to a llvm::Argument instance.

@see llvm::Function::arg_begin()

llgo:link (*OpaqueValue).Params C.LLVMGetParams

func (*OpaqueValue) ParentCatchSwitch

func (self *OpaqueValue) ParentCatchSwitch() ValueRef

Get the parent catchswitch instruction of a catchpad instruction.

This only works on llvm::CatchPadInst instructions.

@see llvm::CatchPadInst::getCatchSwitch()

llgo:link (*OpaqueValue).ParentCatchSwitch C.LLVMGetParentCatchSwitch

func (*OpaqueValue) PersonalityFn

func (self *OpaqueValue) PersonalityFn() ValueRef

Obtain the personality function attached to the function.

@see llvm::Function::getPersonalityFn()

llgo:link (*OpaqueValue).PersonalityFn C.LLVMGetPersonalityFn

func (*OpaqueValue) PrefixData

func (self *OpaqueValue) PrefixData() ValueRef

Gets the prefix data associated with a function. Only valid on functions, and only if LLVMHasPrefixData returns true. See https://llvm.org/docs/LangRef.html#prefix-data

llgo:link (*OpaqueValue).PrefixData C.LLVMGetPrefixData

func (*OpaqueValue) PreviousFunction

func (self *OpaqueValue) PreviousFunction() ValueRef

Decrement a Function iterator to the previous Function.

Returns NULL if the iterator was already at the beginning and there are no previous functions.

llgo:link (*OpaqueValue).PreviousFunction C.LLVMGetPreviousFunction

func (*OpaqueValue) PreviousGlobal

func (self *OpaqueValue) PreviousGlobal() ValueRef

llgo:link (*OpaqueValue).PreviousGlobal C.LLVMGetPreviousGlobal

func (*OpaqueValue) PreviousGlobalAlias

func (self *OpaqueValue) PreviousGlobalAlias() ValueRef

Decrement a GlobalAlias iterator to the previous GlobalAlias.

Returns NULL if the iterator was already at the beginning and there are no previous global aliases.

llgo:link (*OpaqueValue).PreviousGlobalAlias C.LLVMGetPreviousGlobalAlias

func (*OpaqueValue) PreviousGlobalIFunc

func (self *OpaqueValue) PreviousGlobalIFunc() ValueRef

Decrement a GlobalIFunc iterator to the previous GlobalIFunc.

Returns NULL if the iterator was already at the beginning and there are no previous global aliases.

llgo:link (*OpaqueValue).PreviousGlobalIFunc C.LLVMGetPreviousGlobalIFunc

func (*OpaqueValue) PreviousInstruction

func (self *OpaqueValue) PreviousInstruction() ValueRef

Obtain the instruction that occurred before this one.

If the instruction is the first instruction in a basic block, NULL will be returned.

llgo:link (*OpaqueValue).PreviousInstruction C.LLVMGetPreviousInstruction

func (*OpaqueValue) PreviousParam

func (self *OpaqueValue) PreviousParam() ValueRef

Obtain the previous parameter to a function.

This is the opposite of LLVMGetNextParam().

llgo:link (*OpaqueValue).PreviousParam C.LLVMGetPreviousParam

func (*OpaqueValue) PrintValueToString

func (self *OpaqueValue) PrintValueToString() *c.Char

Return a string representation of the value. Use LLVMDisposeMessage to free the string.

@see llvm::Value::print()

llgo:link (*OpaqueValue).PrintValueToString C.LLVMPrintValueToString

func (*OpaqueValue) PrologueData

func (self *OpaqueValue) PrologueData() ValueRef

Gets the prologue data associated with a function. Only valid on functions, and only if LLVMHasPrologueData returns true. See https://llvm.org/docs/LangRef.html#prologue-data

llgo:link (*OpaqueValue).PrologueData C.LLVMGetPrologueData

func (*OpaqueValue) RawDataValues

func (self *OpaqueValue) RawDataValues(SizeInBytes *c.SizeT) *c.Char

Get the raw, underlying bytes of the given constant data sequential.

This is the same as LLVMGetAsString except it works for all constant data sequentials, not just i8 arrays.

@see ConstantDataSequential::getRawDataValues()

llgo:link (*OpaqueValue).RawDataValues C.LLVMGetRawDataValues

func (*OpaqueValue) RemoveCallSiteEnumAttribute

func (self *OpaqueValue) RemoveCallSiteEnumAttribute(Idx AttributeIndex, KindID c.Uint)

llgo:link (*OpaqueValue).RemoveCallSiteEnumAttribute C.LLVMRemoveCallSiteEnumAttribute

func (*OpaqueValue) RemoveCallSiteStringAttribute

func (self *OpaqueValue) RemoveCallSiteStringAttribute(Idx AttributeIndex, K *c.Char, KLen c.Uint)

llgo:link (*OpaqueValue).RemoveCallSiteStringAttribute C.LLVMRemoveCallSiteStringAttribute

func (*OpaqueValue) RemoveEnumAttributeAtIndex

func (self *OpaqueValue) RemoveEnumAttributeAtIndex(Idx AttributeIndex, KindID c.Uint)

llgo:link (*OpaqueValue).RemoveEnumAttributeAtIndex C.LLVMRemoveEnumAttributeAtIndex

func (*OpaqueValue) RemoveGlobalIFunc

func (self *OpaqueValue) RemoveGlobalIFunc()

Remove a global indirect function from its parent module.

This unlinks the global indirect function from its containing module but keeps it alive.

@see llvm::GlobalIFunc::removeFromParent()

llgo:link (*OpaqueValue).RemoveGlobalIFunc C.LLVMRemoveGlobalIFunc

func (*OpaqueValue) RemoveStringAttributeAtIndex

func (self *OpaqueValue) RemoveStringAttributeAtIndex(Idx AttributeIndex, K *c.Char, KLen c.Uint)

llgo:link (*OpaqueValue).RemoveStringAttributeAtIndex C.LLVMRemoveStringAttributeAtIndex

func (*OpaqueValue) ReplaceMDNodeOperandWith

func (self *OpaqueValue) ReplaceMDNodeOperandWith(Index c.Uint, Replacement MetadataRef)

Replace an operand at a specific index in a llvm::MDNode value.

@see llvm::MDNode::replaceOperandWith()

llgo:link (*OpaqueValue).ReplaceMDNodeOperandWith C.LLVMReplaceMDNodeOperandWith

func (*OpaqueValue) RunPassesOnFunction added in v0.2.0

func (self *OpaqueValue) RunPassesOnFunction(Passes *c.Char, TM TargetMachineRef, Options PassBuilderOptionsRef) ErrorRef

Construct and run a set of passes over a function.

This function behaves the same as LLVMRunPasses, but operates on a single function instead of an entire module.

llgo:link (*OpaqueValue).RunPassesOnFunction C.LLVMRunPassesOnFunction

func (*OpaqueValue) Section

func (self *OpaqueValue) Section() *c.Char

llgo:link (*OpaqueValue).Section C.LLVMGetSection

func (*OpaqueValue) SetAlignment

func (self *OpaqueValue) SetAlignment(Bytes c.Uint)

Set the preferred alignment of the value. @see llvm::AllocaInst::setAlignment() @see llvm::LoadInst::setAlignment() @see llvm::StoreInst::setAlignment() @see llvm::AtomicRMWInst::setAlignment() @see llvm::AtomicCmpXchgInst::setAlignment() @see llvm::GlobalValue::setAlignment()

llgo:link (*OpaqueValue).SetAlignment C.LLVMSetAlignment

func (*OpaqueValue) SetArgOperand

func (self *OpaqueValue) SetArgOperand(i c.Uint, value ValueRef)

llgo:link (*OpaqueValue).SetArgOperand C.LLVMSetArgOperand

func (*OpaqueValue) SetAtomicRMWBinOp

func (self *OpaqueValue) SetAtomicRMWBinOp(BinOp AtomicRMWBinOp)

llgo:link (*OpaqueValue).SetAtomicRMWBinOp C.LLVMSetAtomicRMWBinOp

func (*OpaqueValue) SetAtomicSingleThread

func (self *OpaqueValue) SetAtomicSingleThread(SingleThread Bool)

llgo:link (*OpaqueValue).SetAtomicSingleThread C.LLVMSetAtomicSingleThread

func (*OpaqueValue) SetAtomicSyncScopeID

func (self *OpaqueValue) SetAtomicSyncScopeID(SSID c.Uint)

Sets the synchronization scope ID of an atomic instruction.

llgo:link (*OpaqueValue).SetAtomicSyncScopeID C.LLVMSetAtomicSyncScopeID

func (*OpaqueValue) SetCleanup

func (self *OpaqueValue) SetCleanup(Val Bool)

llgo:link (*OpaqueValue).SetCleanup C.LLVMSetCleanup

func (*OpaqueValue) SetCmpXchgFailureOrdering

func (self *OpaqueValue) SetCmpXchgFailureOrdering(Ordering AtomicOrdering)

llgo:link (*OpaqueValue).SetCmpXchgFailureOrdering C.LLVMSetCmpXchgFailureOrdering

func (*OpaqueValue) SetCmpXchgSuccessOrdering

func (self *OpaqueValue) SetCmpXchgSuccessOrdering(Ordering AtomicOrdering)

llgo:link (*OpaqueValue).SetCmpXchgSuccessOrdering C.LLVMSetCmpXchgSuccessOrdering

func (*OpaqueValue) SetComdat

func (self *OpaqueValue) SetComdat(C ComdatRef)

Assign the Comdat to the given global object.

@see llvm::GlobalObject::setComdat()

llgo:link (*OpaqueValue).SetComdat C.LLVMSetComdat

func (*OpaqueValue) SetDLLStorageClass

func (self *OpaqueValue) SetDLLStorageClass(Class DLLStorageClass)

llgo:link (*OpaqueValue).SetDLLStorageClass C.LLVMSetDLLStorageClass

func (*OpaqueValue) SetExact

func (self *OpaqueValue) SetExact(IsExact Bool)

llgo:link (*OpaqueValue).SetExact C.LLVMSetExact

func (*OpaqueValue) SetExternallyInitialized

func (self *OpaqueValue) SetExternallyInitialized(IsExtInit Bool)

llgo:link (*OpaqueValue).SetExternallyInitialized C.LLVMSetExternallyInitialized

func (*OpaqueValue) SetFastMathFlags

func (self *OpaqueValue) SetFastMathFlags(FMF FastMathFlags)

Sets the flags for which fast-math-style optimizations are allowed for this value.

Only valid on floating point instructions. @see LLVMCanValueUseFastMathFlags

llgo:link (*OpaqueValue).SetFastMathFlags C.LLVMSetFastMathFlags

func (*OpaqueValue) SetFunctionCallConv

func (self *OpaqueValue) SetFunctionCallConv(CC c.Uint)

Set the calling convention of a function.

@see llvm::Function::setCallingConv()

@param Fn Function to operate on @param CC LLVMCallConv to set calling convention to

llgo:link (*OpaqueValue).SetFunctionCallConv C.LLVMSetFunctionCallConv

func (*OpaqueValue) SetGC

func (self *OpaqueValue) SetGC(Name *c.Char)

Define the garbage collector to use during code generation.

@see llvm::Function::setGC()

llgo:link (*OpaqueValue).SetGC C.LLVMSetGC

func (*OpaqueValue) SetGlobalConstant

func (self *OpaqueValue) SetGlobalConstant(IsConstant Bool)

llgo:link (*OpaqueValue).SetGlobalConstant C.LLVMSetGlobalConstant

func (*OpaqueValue) SetICmpSameSign

func (self *OpaqueValue) SetICmpSameSign(SameSign Bool)

Set the samesign flag on an icmp instruction.

This is only valid for instructions that correspond to llvm::ICmpInst.

@see llvm::ICmpInst::setSameSign()

llgo:link (*OpaqueValue).SetICmpSameSign C.LLVMSetICmpSameSign

func (*OpaqueValue) SetInstrParamAlignment

func (self *OpaqueValue) SetInstrParamAlignment(Idx AttributeIndex, Align c.Uint)

llgo:link (*OpaqueValue).SetInstrParamAlignment C.LLVMSetInstrParamAlignment

func (*OpaqueValue) SetInstructionCallConv

func (self *OpaqueValue) SetInstructionCallConv(CC c.Uint)

Set the calling convention for a call instruction.

This expects an LLVMValueRef that corresponds to a llvm::CallInst or llvm::InvokeInst.

@see llvm::CallInst::setCallingConv() @see llvm::InvokeInst::setCallingConv()

llgo:link (*OpaqueValue).SetInstructionCallConv C.LLVMSetInstructionCallConv

func (*OpaqueValue) SetIsDisjoint

func (self *OpaqueValue) SetIsDisjoint(IsDisjoint Bool)

Sets the disjoint flag for the instruction. Only valid for or instructions.

llgo:link (*OpaqueValue).SetIsDisjoint C.LLVMSetIsDisjoint

func (*OpaqueValue) SetIsInBounds

func (self *OpaqueValue) SetIsInBounds(InBounds Bool)

Set the given GEP instruction to be inbounds or not.

llgo:link (*OpaqueValue).SetIsInBounds C.LLVMSetIsInBounds

func (*OpaqueValue) SetLinkage

func (self *OpaqueValue) SetLinkage(Linkage Linkage)

llgo:link (*OpaqueValue).SetLinkage C.LLVMSetLinkage

func (*OpaqueValue) SetMetadata

func (self *OpaqueValue) SetMetadata(KindID c.Uint, Node ValueRef)

Set metadata associated with an instruction value.

llgo:link (*OpaqueValue).SetMetadata C.LLVMSetMetadata

func (*OpaqueValue) SetNNeg

func (self *OpaqueValue) SetNNeg(IsNonNeg Bool)

Sets the non-negative flag for the instruction. Only valid for zext instructions.

llgo:link (*OpaqueValue).SetNNeg C.LLVMSetNNeg

func (*OpaqueValue) SetNSW

func (self *OpaqueValue) SetNSW(HasNSW Bool)

llgo:link (*OpaqueValue).SetNSW C.LLVMSetNSW

func (*OpaqueValue) SetNUW

func (self *OpaqueValue) SetNUW(HasNUW Bool)

llgo:link (*OpaqueValue).SetNUW C.LLVMSetNUW

func (*OpaqueValue) SetNormalDest

func (self *OpaqueValue) SetNormalDest(B BasicBlockRef)

Set the normal destination basic block.

This only works on llvm::InvokeInst instructions.

@see llvm::InvokeInst::setNormalDest()

llgo:link (*OpaqueValue).SetNormalDest C.LLVMSetNormalDest

func (*OpaqueValue) SetOperand

func (self *OpaqueValue) SetOperand(Index c.Uint, Val ValueRef)

Set an operand at a specific index in a llvm::User value.

@see llvm::User::setOperand()

llgo:link (*OpaqueValue).SetOperand C.LLVMSetOperand

func (*OpaqueValue) SetOrdering

func (self *OpaqueValue) SetOrdering(Ordering AtomicOrdering)

llgo:link (*OpaqueValue).SetOrdering C.LLVMSetOrdering

func (*OpaqueValue) SetParamAlignment

func (self *OpaqueValue) SetParamAlignment(Align c.Uint)

Set the alignment for a function parameter.

@see llvm::Argument::addAttr() @see llvm::AttrBuilder::addAlignmentAttr()

llgo:link (*OpaqueValue).SetParamAlignment C.LLVMSetParamAlignment

func (*OpaqueValue) SetSection

func (self *OpaqueValue) SetSection(Section *c.Char)

llgo:link (*OpaqueValue).SetSection C.LLVMSetSection

func (*OpaqueValue) SetSubprogram

func (self *OpaqueValue) SetSubprogram(SP MetadataRef)

Set the subprogram attached to a function.

@see llvm::Function::setSubprogram()

llgo:link (*OpaqueValue).SetSubprogram C.LLVMSetSubprogram

func (*OpaqueValue) SetSuccessor

func (self *OpaqueValue) SetSuccessor(i c.Uint, block BasicBlockRef)

Update the specified successor to point at the provided block.

@see llvm::Instruction::setSuccessor

llgo:link (*OpaqueValue).SetSuccessor C.LLVMSetSuccessor

func (*OpaqueValue) SetSwitchCaseValue

func (self *OpaqueValue) SetSwitchCaseValue(i c.Uint, CaseValue ValueRef)

Set the case value for a successor of a switch instruction. i corresponds to the successor index. The first successor is the default destination, so i must be greater than zero.

This only works on llvm::SwitchInst instructions.

@see llvm::SwitchInst::CaseHandle::setValue()

llgo:link (*OpaqueValue).SetSwitchCaseValue C.LLVMSetSwitchCaseValue

func (*OpaqueValue) SetTailCall

func (self *OpaqueValue) SetTailCall(IsTailCall Bool)

Set whether a call instruction is a tail call.

This only works on llvm::CallInst instructions.

@see llvm::CallInst::setTailCall()

llgo:link (*OpaqueValue).SetTailCall C.LLVMSetTailCall

func (*OpaqueValue) SetTailCallKind

func (self *OpaqueValue) SetTailCallKind(kind TailCallKind)

Set the call kind of the call instruction.

@see llvm::CallInst::getTailCallKind()

llgo:link (*OpaqueValue).SetTailCallKind C.LLVMSetTailCallKind

func (*OpaqueValue) SetThreadLocal

func (self *OpaqueValue) SetThreadLocal(IsThreadLocal Bool)

llgo:link (*OpaqueValue).SetThreadLocal C.LLVMSetThreadLocal

func (*OpaqueValue) SetThreadLocalMode

func (self *OpaqueValue) SetThreadLocalMode(Mode ThreadLocalMode)

llgo:link (*OpaqueValue).SetThreadLocalMode C.LLVMSetThreadLocalMode

func (*OpaqueValue) SetUnnamedAddr deprecated

func (self *OpaqueValue) SetUnnamedAddr(HasUnnamedAddr Bool)

Deprecated: Use LLVMSetUnnamedAddress instead.

llgo:link (*OpaqueValue).SetUnnamedAddr C.LLVMSetUnnamedAddr

func (*OpaqueValue) SetUnnamedAddress

func (self *OpaqueValue) SetUnnamedAddress(UnnamedAddr UnnamedAddr)

llgo:link (*OpaqueValue).SetUnnamedAddress C.LLVMSetUnnamedAddress

func (*OpaqueValue) SetUnwindDest

func (self *OpaqueValue) SetUnwindDest(B BasicBlockRef)

Set the unwind destination basic block.

Works on llvm::InvokeInst, llvm::CleanupReturnInst, and llvm::CatchSwitchInst instructions.

@see llvm::InvokeInst::setUnwindDest() @see llvm::CleanupReturnInst::setUnwindDest() @see llvm::CatchSwitchInst::setUnwindDest()

llgo:link (*OpaqueValue).SetUnwindDest C.LLVMSetUnwindDest

func (*OpaqueValue) SetValueName deprecated

func (self *OpaqueValue) SetValueName(Name *c.Char)

Deprecated: Use LLVMSetValueName2 instead.

llgo:link (*OpaqueValue).SetValueName C.LLVMSetValueName

func (*OpaqueValue) SetValueName2

func (self *OpaqueValue) SetValueName2(Name *c.Char, NameLen c.SizeT)

Set the string name of a value.

@see llvm::Value::setName()

llgo:link (*OpaqueValue).SetValueName2 C.LLVMSetValueName2

func (*OpaqueValue) SetVisibility

func (self *OpaqueValue) SetVisibility(Viz Visibility)

llgo:link (*OpaqueValue).SetVisibility C.LLVMSetVisibility

func (*OpaqueValue) SetVolatile

func (self *OpaqueValue) SetVolatile(IsVolatile Bool)

llgo:link (*OpaqueValue).SetVolatile C.LLVMSetVolatile

func (*OpaqueValue) SetWeak

func (self *OpaqueValue) SetWeak(IsWeak Bool)

llgo:link (*OpaqueValue).SetWeak C.LLVMSetWeak

func (*OpaqueValue) StringAttributeAtIndex

func (self *OpaqueValue) StringAttributeAtIndex(Idx AttributeIndex, K *c.Char, KLen c.Uint) AttributeRef

llgo:link (*OpaqueValue).StringAttributeAtIndex C.LLVMGetStringAttributeAtIndex

func (*OpaqueValue) Subprogram

func (self *OpaqueValue) Subprogram() MetadataRef

Get the metadata of the subprogram attached to a function.

@see llvm::Function::getSubprogram()

llgo:link (*OpaqueValue).Subprogram C.LLVMGetSubprogram

func (*OpaqueValue) Successor

func (self *OpaqueValue) Successor(i c.Uint) BasicBlockRef

Return the specified successor.

@see llvm::Instruction::getSuccessor

llgo:link (*OpaqueValue).Successor C.LLVMGetSuccessor

func (*OpaqueValue) SwitchCaseValue

func (self *OpaqueValue) SwitchCaseValue(i c.Uint) ValueRef

Obtain the case value for a successor of a switch instruction. i corresponds to the successor index. The first successor is the default destination, so i must be greater than zero.

This only works on llvm::SwitchInst instructions.

@see llvm::SwitchInst::CaseHandle::getCaseValue()

llgo:link (*OpaqueValue).SwitchCaseValue C.LLVMGetSwitchCaseValue

func (*OpaqueValue) SwitchDefaultDest

func (self *OpaqueValue) SwitchDefaultDest() BasicBlockRef

Obtain the default destination basic block of a switch instruction.

This only works on llvm::SwitchInst instructions.

@see llvm::SwitchInst::getDefaultDest()

llgo:link (*OpaqueValue).SwitchDefaultDest C.LLVMGetSwitchDefaultDest

func (*OpaqueValue) TailCallKind

func (self *OpaqueValue) TailCallKind() TailCallKind

Obtain a tail call kind of the call instruction.

@see llvm::CallInst::setTailCallKind()

llgo:link (*OpaqueValue).TailCallKind C.LLVMGetTailCallKind

func (*OpaqueValue) ThreadLocalMode

func (self *OpaqueValue) ThreadLocalMode() ThreadLocalMode

llgo:link (*OpaqueValue).ThreadLocalMode C.LLVMGetThreadLocalMode

func (*OpaqueValue) TypeOf

func (self *OpaqueValue) TypeOf() TypeRef

Obtain the type of a value.

@see llvm::Value::getType()

llgo:link (*OpaqueValue).TypeOf C.LLVMTypeOf

func (*OpaqueValue) UnnamedAddress

func (self *OpaqueValue) UnnamedAddress() UnnamedAddr

llgo:link (*OpaqueValue).UnnamedAddress C.LLVMGetUnnamedAddress

func (*OpaqueValue) UnwindDest

func (self *OpaqueValue) UnwindDest() BasicBlockRef

Return the unwind destination basic block.

Works on llvm::InvokeInst, llvm::CleanupReturnInst, and llvm::CatchSwitchInst instructions.

@see llvm::InvokeInst::getUnwindDest() @see llvm::CleanupReturnInst::getUnwindDest() @see llvm::CatchSwitchInst::getUnwindDest()

llgo:link (*OpaqueValue).UnwindDest C.LLVMGetUnwindDest

func (*OpaqueValue) ValueAsBasicBlock

func (self *OpaqueValue) ValueAsBasicBlock() BasicBlockRef

Convert an LLVMValueRef to an LLVMBasicBlockRef instance.

llgo:link (*OpaqueValue).ValueAsBasicBlock C.LLVMValueAsBasicBlock

func (*OpaqueValue) ValueAsMetadata

func (self *OpaqueValue) ValueAsMetadata() MetadataRef

Obtain a Value as a Metadata.

llgo:link (*OpaqueValue).ValueAsMetadata C.LLVMValueAsMetadata

func (*OpaqueValue) ValueContext

func (self *OpaqueValue) ValueContext() ContextRef

Obtain the context to which this value is associated.

@see llvm::Value::getContext()

llgo:link (*OpaqueValue).ValueContext C.LLVMGetValueContext

func (*OpaqueValue) ValueIsBasicBlock

func (self *OpaqueValue) ValueIsBasicBlock() Bool

Determine whether an LLVMValueRef is itself a basic block.

llgo:link (*OpaqueValue).ValueIsBasicBlock C.LLVMValueIsBasicBlock

func (*OpaqueValue) ValueKind

func (self *OpaqueValue) ValueKind() ValueKind

Obtain the enumerated type of a Value instance.

@see llvm::Value::getValueID()

llgo:link (*OpaqueValue).ValueKind C.LLVMGetValueKind

func (*OpaqueValue) ValueName deprecated

func (self *OpaqueValue) ValueName() *c.Char

Deprecated: Use LLVMGetValueName2 instead.

llgo:link (*OpaqueValue).ValueName C.LLVMGetValueName

func (*OpaqueValue) ValueName2

func (self *OpaqueValue) ValueName2(Length *c.SizeT) *c.Char

Obtain the string name of a value.

@see llvm::Value::getName()

llgo:link (*OpaqueValue).ValueName2 C.LLVMGetValueName2

func (*OpaqueValue) VerifyFunction

func (self *OpaqueValue) VerifyFunction(Action VerifierFailureAction) Bool

llgo:link (*OpaqueValue).VerifyFunction C.LLVMVerifyFunction

func (*OpaqueValue) ViewFunctionCFG

func (self *OpaqueValue) ViewFunctionCFG()

llgo:link (*OpaqueValue).ViewFunctionCFG C.LLVMViewFunctionCFG

func (*OpaqueValue) ViewFunctionCFGOnly

func (self *OpaqueValue) ViewFunctionCFGOnly()

llgo:link (*OpaqueValue).ViewFunctionCFGOnly C.LLVMViewFunctionCFGOnly

func (*OpaqueValue) Visibility

func (self *OpaqueValue) Visibility() Visibility

llgo:link (*OpaqueValue).Visibility C.LLVMGetVisibility

func (*OpaqueValue) Volatile

func (self *OpaqueValue) Volatile() Bool

llgo:link (*OpaqueValue).Volatile C.LLVMGetVolatile

func (*OpaqueValue) Weak

func (self *OpaqueValue) Weak() Bool

llgo:link (*OpaqueValue).Weak C.LLVMGetWeak

type OpaqueValueMetadataEntry

type OpaqueValueMetadataEntry struct {
}

func (OpaqueValueMetadataEntry) DisposeValueMetadataEntries

func (self OpaqueValueMetadataEntry) DisposeValueMetadataEntries()

Destroys value metadata entries.

llgo:link OpaqueValueMetadataEntry.DisposeValueMetadataEntries C.LLVMDisposeValueMetadataEntries

func (OpaqueValueMetadataEntry) ValueMetadataEntriesGetKind

func (self OpaqueValueMetadataEntry) ValueMetadataEntriesGetKind(Index c.Uint) c.Uint

Returns the kind of a value metadata entry at a specific index.

llgo:link OpaqueValueMetadataEntry.ValueMetadataEntriesGetKind C.LLVMValueMetadataEntriesGetKind

func (OpaqueValueMetadataEntry) ValueMetadataEntriesGetMetadata

func (self OpaqueValueMetadataEntry) ValueMetadataEntriesGetMetadata(Index c.Uint) MetadataRef

Returns the underlying metadata node of a value metadata entry at a specific index.

llgo:link OpaqueValueMetadataEntry.ValueMetadataEntriesGetMetadata C.LLVMValueMetadataEntriesGetMetadata

type Opcode

type Opcode c.Int

External users depend on the following values being stable. It is not safe to reorder them.

const (
	Ret            Opcode = 1
	Br             Opcode = 2
	Switch         Opcode = 3
	IndirectBr     Opcode = 4
	Invoke         Opcode = 5
	Unreachable    Opcode = 7
	CallBr         Opcode = 67
	FNeg           Opcode = 66
	Add            Opcode = 8
	FAdd           Opcode = 9
	Sub            Opcode = 10
	FSub           Opcode = 11
	Mul            Opcode = 12
	FMul           Opcode = 13
	UDiv           Opcode = 14
	SDiv           Opcode = 15
	FDiv           Opcode = 16
	URem           Opcode = 17
	SRem           Opcode = 18
	FRem           Opcode = 19
	Shl            Opcode = 20
	LShr           Opcode = 21
	AShr           Opcode = 22
	And            Opcode = 23
	Or             Opcode = 24
	Xor            Opcode = 25
	Alloca         Opcode = 26
	Load           Opcode = 27
	Store          Opcode = 28
	GetElementPtr  Opcode = 29
	Trunc          Opcode = 30
	ZExt           Opcode = 31
	SExt           Opcode = 32
	FPToUI         Opcode = 33
	FPToSI         Opcode = 34
	UIToFP         Opcode = 35
	SIToFP         Opcode = 36
	FPTrunc        Opcode = 37
	FPExt          Opcode = 38
	PtrToInt       Opcode = 39
	PtrToAddr      Opcode = 69
	IntToPtr       Opcode = 40
	BitCast        Opcode = 41
	AddrSpaceCast  Opcode = 60
	ICmp           Opcode = 42
	FCmp           Opcode = 43
	PHI            Opcode = 44
	Call           Opcode = 45
	Select         Opcode = 46
	UserOp1        Opcode = 47
	UserOp2        Opcode = 48
	VAArg          Opcode = 49
	ExtractElement Opcode = 50
	InsertElement  Opcode = 51
	ShuffleVector  Opcode = 52
	ExtractValue   Opcode = 53
	InsertValue    Opcode = 54
	Freeze         Opcode = 68
	Fence          Opcode = 55
	AtomicCmpXchg  Opcode = 56
	AtomicRMW      Opcode = 57
	Resume         Opcode = 58
	LandingPad     Opcode = 59
	CleanupRet     Opcode = 61
	CatchRet       Opcode = 62
	CatchPad       Opcode = 63
	CleanupPad     Opcode = 64
	CatchSwitch    Opcode = 65
)

type OperandBundleRef

type OperandBundleRef = *OpaqueOperandBundle

@see llvm::OperandBundleDef

func CreateOperandBundle

func CreateOperandBundle(Tag *c.Char, TagLen c.SizeT, Args *ValueRef, NumArgs c.Uint) OperandBundleRef

Create a new operand bundle.

Every invocation should be paired with LLVMDisposeOperandBundle() or memory will be leaked.

@param Tag Tag name of the operand bundle @param TagLen Length of Tag @param Args Memory address of an array of bundle operands @param NumArgs Length of Args

type OrcCAPIDefinitionGeneratorTryToGenerateFunction

type OrcCAPIDefinitionGeneratorTryToGenerateFunction = func(_llcppg_param1 OrcDefinitionGeneratorRef, _llcppg_param2 unsafe.Pointer, _llcppg_param3 *OrcLookupStateRef, _llcppg_param4 OrcLookupKind, _llcppg_param5 OrcJITDylibRef, _llcppg_param6 OrcJITDylibLookupFlags, _llcppg_param7 OrcCLookupSet, _llcppg_param8 c.SizeT) ErrorRef

A custom generator function. This can be used to create a custom generator object using LLVMOrcCreateCustomCAPIDefinitionGenerator. The resulting object can be attached to a JITDylib, via LLVMOrcJITDylibAddGenerator, to receive callbacks when lookups fail to match existing definitions.

GeneratorObj will contain the address of the custom generator object.

Ctx will contain the context object passed to LLVMOrcCreateCustomCAPIDefinitionGenerator.

LookupState will contain a pointer to an LLVMOrcLookupStateRef object. This can optionally be modified to make the definition generation process asynchronous: If the LookupStateRef value is copied, and the original LLVMOrcLookupStateRef set to null, the lookup will be suspended. Once the asynchronous definition process has been completed clients must call LLVMOrcLookupStateContinueLookup to continue the lookup (this should be done unconditionally, even if errors have occurred in the mean time, to free the lookup state memory and notify the query object of the failures). If LookupState is captured this function must return LLVMErrorSuccess.

The Kind argument can be inspected to determine the lookup kind (e.g. as-if-during-static-link, or as-if-during-dlsym).

The JD argument specifies which JITDylib the definitions should be generated into.

The JDLookupFlags argument can be inspected to determine whether the original lookup included non-exported symbols.

Finally, the LookupSet argument contains the set of symbols that could not be found in JD already (the set of generation candidates).

llgo:type C

type OrcCDependenceMapPair

type OrcCDependenceMapPair struct {
	JD    OrcJITDylibRef
	Names OrcCSymbolsList
}

Represents a pair of a JITDylib and LLVMOrcCSymbolsList.

type OrcCDependenceMapPairs

type OrcCDependenceMapPairs = *OrcCDependenceMapPair

Represents a list of (JITDylibRef, (LLVMOrcSymbolStringPoolEntryRef*, size_t)) pairs that can be used to construct a SymbolDependenceMap.

type OrcCJITDylibSearchOrder

type OrcCJITDylibSearchOrder = *OrcCJITDylibSearchOrderElement

A JITDylib search order.

The list is terminated with an element containing a null pointer for the JD field.

type OrcCJITDylibSearchOrderElement

type OrcCJITDylibSearchOrderElement struct {
	JD            OrcJITDylibRef
	JDLookupFlags OrcJITDylibLookupFlags
}

An element type for a JITDylib search order.

type OrcCLookupSet

type OrcCLookupSet = *OrcCLookupSetElement

A set of symbols to look up / generate.

The list is terminated with an element containing a null pointer for the Name field.

If a client creates an instance of this type then they are responsible for freeing it, and for ensuring that all strings have been retained over the course of its life. Clients receiving a copy from a callback are not responsible for managing lifetime or retain counts.

type OrcCLookupSetElement

type OrcCLookupSetElement struct {
	Name        OrcSymbolStringPoolEntryRef
	LookupFlags OrcSymbolLookupFlags
}

An element type for a symbol lookup set.

type OrcCSymbolAliasMapEntry

type OrcCSymbolAliasMapEntry struct {
	Name  OrcSymbolStringPoolEntryRef
	Flags JITSymbolFlags
}

Represents a SymbolAliasMapEntry

type OrcCSymbolAliasMapPair

type OrcCSymbolAliasMapPair struct {
	Name  OrcSymbolStringPoolEntryRef
	Entry OrcCSymbolAliasMapEntry
}

Represents a pair of a symbol name and SymbolAliasMapEntry.

type OrcCSymbolAliasMapPairs

type OrcCSymbolAliasMapPairs = *OrcCSymbolAliasMapPair

Represents a list of (SymbolStringPtr, (SymbolStringPtr, JITSymbolFlags)) pairs that can be used to construct a SymbolFlagsMap.

type OrcCSymbolDependenceGroup

type OrcCSymbolDependenceGroup struct {
	Symbols         OrcCSymbolsList
	Dependencies    OrcCDependenceMapPairs
	NumDependencies c.SizeT
}

A set of symbols that share dependencies.

type OrcCSymbolFlagsMapPair

type OrcCSymbolFlagsMapPair struct {
	Name  OrcSymbolStringPoolEntryRef
	Flags JITSymbolFlags
}

Represents a pair of a symbol name and LLVMJITSymbolFlags.

func (*OrcCSymbolFlagsMapPair) OrcDisposeCSymbolFlagsMap

func (self *OrcCSymbolFlagsMapPair) OrcDisposeCSymbolFlagsMap()

Disposes of the passed LLVMOrcCSymbolFlagsMap.

Does not release the entries themselves.

llgo:link (*OrcCSymbolFlagsMapPair).OrcDisposeCSymbolFlagsMap C.LLVMOrcDisposeCSymbolFlagsMap

type OrcCSymbolFlagsMapPairs

type OrcCSymbolFlagsMapPairs = *OrcCSymbolFlagsMapPair

Represents a list of (SymbolStringPtr, JITSymbolFlags) pairs that can be used to construct a SymbolFlagsMap.

type OrcCSymbolMapPair

type OrcCSymbolMapPair struct {
	Name OrcSymbolStringPoolEntryRef
	Sym  JITEvaluatedSymbol
}

Represents a pair of a symbol name and an evaluated symbol.

func (*OrcCSymbolMapPair) OrcAbsoluteSymbols

func (self *OrcCSymbolMapPair) OrcAbsoluteSymbols(NumPairs c.SizeT) OrcMaterializationUnitRef

Create a MaterializationUnit to define the given symbols as pointing to the corresponding raw addresses.

This function takes ownership of the elements of the Syms array. The Name fields of the array elements are taken to have been retained for this function. This allows the following pattern...

size_t NumPairs;
LLVMOrcCSymbolMapPairs Sym;
-- Build Syms array --
LLVMOrcMaterializationUnitRef MU =
    LLVMOrcAbsoluteSymbols(Syms, NumPairs);

... without requiring cleanup of the elements of the Sym array afterwards.

The client is still responsible for deleting the Sym array itself.

If a client wishes to reuse elements of the Sym array after this call they must explicitly retain each of the elements for themselves.

llgo:link (*OrcCSymbolMapPair).OrcAbsoluteSymbols C.LLVMOrcAbsoluteSymbols

type OrcCSymbolMapPairs

type OrcCSymbolMapPairs = *OrcCSymbolMapPair

Represents a list of (SymbolStringPtr, JITEvaluatedSymbol) pairs that can be used to construct a SymbolMap.

type OrcCSymbolsList

type OrcCSymbolsList struct {
	Symbols *OrcSymbolStringPoolEntryRef
	Length  c.SizeT
}

Represents a list of LLVMOrcSymbolStringPoolEntryRef and the associated length.

type OrcDefinitionGeneratorRef

type OrcDefinitionGeneratorRef = *OrcOpaqueDefinitionGenerator

A reference to an orc::DefinitionGenerator.

func OrcCreateCustomCAPIDefinitionGenerator

Create a custom generator.

The F argument will be used to implement the DefinitionGenerator's tryToGenerate method (see LLVMOrcCAPIDefinitionGeneratorTryToGenerateFunction).

Ctx is a context object that will be passed to F. This argument is permitted to be null.

Dispose is the disposal function for Ctx. This argument is permitted to be null (in which case the client is responsible for the lifetime of Ctx).

type OrcDisposeCAPIDefinitionGeneratorFunction

type OrcDisposeCAPIDefinitionGeneratorFunction = func(_llcppg_param1 unsafe.Pointer)

Disposer for a custom generator.

Will be called by ORC when the JITDylib that the generator is attached to is destroyed.

llgo:type C

type OrcDumpObjectsRef

type OrcDumpObjectsRef = *OrcOpaqueDumpObjects

A reference to an orc::DumpObjects object.

Can be used to dump object files to disk with unique names. Useful as an ObjectTransformLayer transform.

func OrcCreateDumpObjects

func OrcCreateDumpObjects(DumpDir *c.Char, IdentifierOverride *c.Char) OrcDumpObjectsRef

Create a DumpObjects instance.

DumpDir specifies the path to write dumped objects to. DumpDir may be empty in which case files will be dumped to the working directory.

IdentifierOverride specifies a file name stem to use when dumping objects. If empty then each MemoryBuffer's identifier will be used (with a .o suffix added if not already present). If an identifier override is supplied it will be used instead, along with an incrementing counter (since all buffers will use the same identifier, the resulting files will be named <ident>.o, <ident>.2.o, <ident>.3.o, and so on). IdentifierOverride should not contain an extension, as a .o suffix will be added by DumpObjects.

type OrcErrorReporterFunction

type OrcErrorReporterFunction = func(_llcppg_param1 unsafe.Pointer, _llcppg_param2 ErrorRef)

Error reporter function.

llgo:type C

type OrcExecutionSessionLookupHandleResultFunction

type OrcExecutionSessionLookupHandleResultFunction = func(_llcppg_param1 ErrorRef, _llcppg_param2 OrcCSymbolMapPairs, _llcppg_param3 c.SizeT, _llcppg_param4 unsafe.Pointer)

Callback type for ExecutionSession lookups.

If Err is LLVMErrorSuccess then Result will contain a pointer to a list of ( SymbolStringPtr, JITEvaluatedSymbol ) pairs of length NumPairs.

If Err is a failure value then Result and Ctx are undefined and should not be accessed. The Callback is responsible for handling the error value (e.g. by calling LLVMGetErrorMessage + LLVMDisposeErrorMessage).

The caller retains ownership of the Result array and will release all contained symbol names. Clients are responsible for retaining any symbol names that they wish to hold after the function returns.

llgo:type C

type OrcExecutionSessionRef

type OrcExecutionSessionRef = *OrcOpaqueExecutionSession

A reference to an orc::ExecutionSession instance.

type OrcExecutorAddress

type OrcExecutorAddress = c.Uint64T

Represents an address in the executor process.

type OrcGenericIRModuleOperationFunction

type OrcGenericIRModuleOperationFunction = func(_llcppg_param1 unsafe.Pointer, _llcppg_param2 ModuleRef) ErrorRef

A function for inspecting/mutating IR modules, suitable for use with LLVMOrcThreadSafeModuleWithModuleDo.

llgo:type C

type OrcIRTransformLayerRef

type OrcIRTransformLayerRef = *OrcOpaqueIRTransformLayer

A reference to an orc::IRTransformLayer instance.

type OrcIRTransformLayerTransformFunction

type OrcIRTransformLayerTransformFunction = func(_llcppg_param1 unsafe.Pointer, _llcppg_param2 *OrcThreadSafeModuleRef, _llcppg_param3 OrcMaterializationResponsibilityRef) ErrorRef

A function for applying transformations as part of an transform layer.

Implementations of this type are responsible for managing the lifetime of the Module pointed to by ModInOut: If the LLVMModuleRef value is overwritten then the function is responsible for disposing of the incoming module. If the module is simply accessed/mutated in-place then ownership returns to the caller and the function does not need to do any lifetime management.

Clients can call LLVMOrcLLJITGetIRTransformLayer to obtain the transform layer of a LLJIT instance, and use LLVMOrcIRTransformLayerSetTransform to set the function. This can be used to override the default transform layer.

llgo:type C

type OrcIndirectStubsManagerRef

type OrcIndirectStubsManagerRef = *OrcOpaqueIndirectStubsManager

A reference to an orc::IndirectStubsManager instance.

func OrcCreateLocalIndirectStubsManager

func OrcCreateLocalIndirectStubsManager(TargetTriple *c.Char) OrcIndirectStubsManagerRef

Create a LocalIndirectStubsManager from the given target triple.

The resulting IndirectStubsManager is owned by the client and must be disposed of by calling LLVMOrcDisposeDisposeIndirectStubsManager.

type OrcJITDylibLookupFlags

type OrcJITDylibLookupFlags c.Int

JITDylib lookup flags. This can be used by definition generators when deciding whether to produce a definition for a requested symbol.

This enum should be kept in sync with llvm::orc::JITDylibLookupFlags.

const (
	OrcJITDylibLookupFlagsMatchExportedSymbolsOnly OrcJITDylibLookupFlags = 0
	OrcJITDylibLookupFlagsMatchAllSymbols          OrcJITDylibLookupFlags = 1
)

type OrcJITDylibRef

type OrcJITDylibRef = *OrcOpaqueJITDylib

A reference to an orc::JITDylib instance.

type OrcJITTargetAddress

type OrcJITTargetAddress = c.Uint64T

Represents an address in the executor process.

type OrcJITTargetMachineBuilderRef

type OrcJITTargetMachineBuilderRef = *OrcOpaqueJITTargetMachineBuilder

A reference to an orc::JITTargetMachineBuilder instance.

type OrcLLJITBuilderObjectLinkingLayerCreatorFunction

type OrcLLJITBuilderObjectLinkingLayerCreatorFunction = func(_llcppg_param1 unsafe.Pointer, _llcppg_param2 OrcExecutionSessionRef, _llcppg_param3 *c.Char) OrcObjectLayerRef

A function for constructing an ObjectLinkingLayer instance to be used by an LLJIT instance.

Clients can call LLVMOrcLLJITBuilderSetObjectLinkingLayerCreator to set the creator function to use when constructing an LLJIT instance. This can be used to override the default linking layer implementation that would otherwise be chosen by LLJITBuilder.

Object linking layers returned by this function will become owned by the LLJIT instance. The client is not responsible for managing their lifetimes after the function returns.

llgo:type C

type OrcLLJITBuilderRef

type OrcLLJITBuilderRef = *OrcOpaqueLLJITBuilder

A reference to an orc::LLJITBuilder instance.

func OrcCreateLLJITBuilder

func OrcCreateLLJITBuilder() OrcLLJITBuilderRef

Create an LLVMOrcLLJITBuilder.

The client owns the resulting LLJITBuilder and should dispose of it using LLVMOrcDisposeLLJITBuilder once they are done with it.

type OrcLLJITRef

type OrcLLJITRef = *OrcOpaqueLLJIT

A reference to an orc::LLJIT instance.

type OrcLazyCallThroughManagerRef

type OrcLazyCallThroughManagerRef = *OrcOpaqueLazyCallThroughManager

A reference to an orc::LazyCallThroughManager instance.

type OrcLookupKind

type OrcLookupKind c.Int

Lookup kind. This can be used by definition generators when deciding whether to produce a definition for a requested symbol.

This enum should be kept in sync with llvm::orc::LookupKind.

const (
	OrcLookupKindStatic OrcLookupKind = 0
	OrcLookupKindDLSym  OrcLookupKind = 1
)

type OrcLookupStateRef

type OrcLookupStateRef = *OrcOpaqueLookupState

An opaque lookup state object. Instances of this type can be captured to suspend a lookup while a custom generator function attempts to produce a definition.

If a client captures a lookup state object then they must eventually call LLVMOrcLookupStateContinueLookup to restart the lookup. This is required in order to release memory allocated for the lookup state, even if errors have occurred while the lookup was suspended (if these errors have made the lookup impossible to complete then it will issue its own error before destruction).

type OrcMaterializationResponsibilityRef

type OrcMaterializationResponsibilityRef = *OrcOpaqueMaterializationResponsibility

A reference to a uniquely owned orc::MaterializationResponsibility instance.

Ownership must be passed to a lower-level layer in a JIT stack.

type OrcMaterializationUnitDestroyFunction

type OrcMaterializationUnitDestroyFunction = func(_llcppg_param1 unsafe.Pointer)

A MaterializationUnit destruction callback.

If a custom MaterializationUnit is destroyed before its Materialize function is called then this function will be called to provide an opportunity for the underlying program representation to be destroyed.

llgo:type C

type OrcMaterializationUnitDiscardFunction

type OrcMaterializationUnitDiscardFunction = func(_llcppg_param1 unsafe.Pointer, _llcppg_param2 OrcJITDylibRef, _llcppg_param3 OrcSymbolStringPoolEntryRef)

A MaterializationUnit discard callback.

Ownership of JD and Symbol remain with the caller: These arguments should not be disposed of or released.

llgo:type C

type OrcMaterializationUnitMaterializeFunction

type OrcMaterializationUnitMaterializeFunction = func(_llcppg_param1 unsafe.Pointer, _llcppg_param2 OrcMaterializationResponsibilityRef)

A MaterializationUnit materialize callback.

Ownership of the Ctx and MR arguments passes to the callback which must adhere to the LLVMOrcMaterializationResponsibilityRef contract (see comment for that type).

If this callback is called then the LLVMOrcMaterializationUnitDestroy callback will NOT be called.

llgo:type C

type OrcMaterializationUnitRef

type OrcMaterializationUnitRef = *OrcOpaqueMaterializationUnit

A reference to a uniquely owned orc::MaterializationUnit instance.

func OrcCreateCustomMaterializationUnit

Create a custom MaterializationUnit.

Name is a name for this MaterializationUnit to be used for identification and logging purposes (e.g. if this MaterializationUnit produces an object buffer then the name of that buffer will be derived from this name).

The Syms list contains the names and linkages of the symbols provided by this unit. This function takes ownership of the elements of the Syms array. The Name fields of the array elements are taken to have been retained for this function. The client should *not* release the elements of the array, but is still responsible for destroying the array itself.

The InitSym argument indicates whether or not this MaterializationUnit contains static initializers. If three are no static initializers (the common case) then this argument should be null. If there are static initializers then InitSym should be set to a unique name that also appears in the Syms list with the LLVMJITSymbolGenericFlagsMaterializationSideEffectsOnly flag set. This function takes ownership of the InitSym, which should have been retained twice on behalf of this function: once for the Syms entry and once for InitSym. If clients wish to use the InitSym value after this function returns they must retain it once more for themselves.

If any of the symbols in the Syms list is looked up then the Materialize function will be called.

If any of the symbols in the Syms list is overridden then the Discard function will be called.

The caller owns the underling MaterializationUnit and is responsible for either passing it to a JITDylib (via LLVMOrcJITDylibDefine) or disposing of it by calling LLVMOrcDisposeMaterializationUnit.

type OrcObjectLayerRef

type OrcObjectLayerRef = *OrcOpaqueObjectLayer

A reference to an orc::ObjectLayer instance.

func OrcCreateRTDyldObjectLinkingLayerWithMCJITMemoryManagerLikeCallbacks

func OrcCreateRTDyldObjectLinkingLayerWithMCJITMemoryManagerLikeCallbacks(ES OrcExecutionSessionRef, CreateContextCtx unsafe.Pointer, CreateContext MemoryManagerCreateContextCallback, NotifyTerminating MemoryManagerNotifyTerminatingCallback, AllocateCodeSection MemoryManagerAllocateCodeSectionCallback, AllocateDataSection MemoryManagerAllocateDataSectionCallback, FinalizeMemory MemoryManagerFinalizeMemoryCallback, Destroy MemoryManagerDestroyCallback) OrcObjectLayerRef

Create a RTDyldObjectLinkingLayer instance using MCJIT-memory-manager-like callbacks.

This is intended to simplify transitions for existing MCJIT clients. The callbacks used are similar (but not identical) to the callbacks for LLVMCreateSimpleMCJITMemoryManager: Unlike MCJIT, RTDyldObjectLinkingLayer will create a new memory manager for each object linked by calling the given CreateContext callback. This allows for code removal by destroying each allocator individually. Every allocator will be destroyed (if it has not been already) at RTDyldObjectLinkingLayer destruction time, and the NotifyTerminating callback will be called to indicate that no further allocation contexts will be created.

To implement MCJIT-like behavior clients can implement CreateContext, NotifyTerminating, and Destroy as:

void *CreateContext(void *CtxCtx) { return CtxCtx; }
void NotifyTerminating(void *CtxCtx) { MyOriginalDestroy(CtxCtx); }
void Destroy(void *Ctx) { }

This scheme simply reuses the CreateContextCtx pointer as the one-and-only allocation context.

type OrcObjectLinkingLayerRef

type OrcObjectLinkingLayerRef = *OrcOpaqueObjectLinkingLayer

A reference to an orc::ObjectLinkingLayer instance.

type OrcObjectTransformLayerRef

type OrcObjectTransformLayerRef = *OrcOpaqueObjectTransformLayer

A reference to an orc::ObjectTransformLayer instance.

type OrcObjectTransformLayerTransformFunction

type OrcObjectTransformLayerTransformFunction = func(_llcppg_param1 unsafe.Pointer, _llcppg_param2 *MemoryBufferRef) ErrorRef

A function for applying transformations to an object file buffer.

Implementations of this type are responsible for managing the lifetime of the memory buffer pointed to by ObjInOut: If the LLVMMemoryBufferRef value is overwritten then the function is responsible for disposing of the incoming buffer. If the buffer is simply accessed/mutated in-place then ownership returns to the caller and the function does not need to do any lifetime management.

The transform is allowed to return an error, in which case the ObjInOut buffer should be disposed of and set to null.

llgo:type C

type OrcOpaqueDefinitionGenerator

type OrcOpaqueDefinitionGenerator struct {
}

func (*OrcOpaqueDefinitionGenerator) OrcCreateStaticLibrarySearchGeneratorForPath

func (self *OrcOpaqueDefinitionGenerator) OrcCreateStaticLibrarySearchGeneratorForPath(ObjLayer OrcObjectLayerRef, FileName *c.Char) ErrorRef

Get a LLVMOrcCreateStaticLibrarySearchGeneratorForPath that will reflect static library symbols into the JITDylib. On success the resulting generator is owned by the client. Ownership is typically transferred by adding the instance to a JITDylib using LLVMOrcJITDylibAddGenerator,

Call with the optional TargetTriple argument will succeed if the file at the given path is a static library or a MachO universal binary containing a static library that is compatible with the given triple. Otherwise it will return an error.

THIS API IS EXPERIMENTAL AND LIKELY TO CHANGE IN THE NEAR FUTURE!

llgo:link (*OrcOpaqueDefinitionGenerator).OrcCreateStaticLibrarySearchGeneratorForPath C.LLVMOrcCreateStaticLibrarySearchGeneratorForPath

func (*OrcOpaqueDefinitionGenerator) OrcDisposeDefinitionGenerator

func (self *OrcOpaqueDefinitionGenerator) OrcDisposeDefinitionGenerator()

Dispose of a JITDylib::DefinitionGenerator. This should only be called if ownership has not been passed to a JITDylib (e.g. because some error prevented the client from calling LLVMOrcJITDylibAddGenerator).

llgo:link (*OrcOpaqueDefinitionGenerator).OrcDisposeDefinitionGenerator C.LLVMOrcDisposeDefinitionGenerator

type OrcOpaqueDumpObjects

type OrcOpaqueDumpObjects struct {
}

func (*OrcOpaqueDumpObjects) OrcDisposeDumpObjects

func (self *OrcOpaqueDumpObjects) OrcDisposeDumpObjects()

Dispose of a DumpObjects instance.

llgo:link (*OrcOpaqueDumpObjects).OrcDisposeDumpObjects C.LLVMOrcDisposeDumpObjects

func (*OrcOpaqueDumpObjects) OrcDumpObjects_CallOperator

func (self *OrcOpaqueDumpObjects) OrcDumpObjects_CallOperator(ObjBuffer *MemoryBufferRef) ErrorRef

Dump the contents of the given MemoryBuffer.

llgo:link (*OrcOpaqueDumpObjects).OrcDumpObjects_CallOperator C.LLVMOrcDumpObjects_CallOperator

type OrcOpaqueExecutionSession

type OrcOpaqueExecutionSession struct {
}

func (*OrcOpaqueExecutionSession) OrcCreateRTDyldObjectLinkingLayerWithSectionMemoryManager

func (self *OrcOpaqueExecutionSession) OrcCreateRTDyldObjectLinkingLayerWithSectionMemoryManager() OrcObjectLayerRef

Create a RTDyldObjectLinkingLayer instance using the standard SectionMemoryManager for memory management.

llgo:link (*OrcOpaqueExecutionSession).OrcCreateRTDyldObjectLinkingLayerWithSectionMemoryManager C.LLVMOrcCreateRTDyldObjectLinkingLayerWithSectionMemoryManager

func (*OrcOpaqueExecutionSession) OrcCreateRTDyldObjectLinkingLayerWithSectionMemoryManagerReserveAlloc

func (self *OrcOpaqueExecutionSession) OrcCreateRTDyldObjectLinkingLayerWithSectionMemoryManagerReserveAlloc(ReserveAlloc Bool) OrcObjectLayerRef

Create a RTDyldObjectLinkingLayer instance using the standard SectionMemoryManager for memory management. If ReserveAlloc is true then a contiguous range of memory will be reserved for each object file.

llgo:link (*OrcOpaqueExecutionSession).OrcCreateRTDyldObjectLinkingLayerWithSectionMemoryManagerReserveAlloc C.LLVMOrcCreateRTDyldObjectLinkingLayerWithSectionMemoryManagerReserveAlloc

func (*OrcOpaqueExecutionSession) OrcExecutionSessionCreateBareJITDylib

func (self *OrcOpaqueExecutionSession) OrcExecutionSessionCreateBareJITDylib(Name *c.Char) OrcJITDylibRef

Create a "bare" JITDylib.

The client is responsible for ensuring that the JITDylib's name is unique, e.g. by calling LLVMOrcExecutionSessionGetJTIDylibByName first.

This call does not install any library code or symbols into the newly created JITDylib. The client is responsible for all configuration.

llgo:link (*OrcOpaqueExecutionSession).OrcExecutionSessionCreateBareJITDylib C.LLVMOrcExecutionSessionCreateBareJITDylib

func (*OrcOpaqueExecutionSession) OrcExecutionSessionCreateJITDylib

func (self *OrcOpaqueExecutionSession) OrcExecutionSessionCreateJITDylib(Result *OrcJITDylibRef, Name *c.Char) ErrorRef

Create a JITDylib.

The client is responsible for ensuring that the JITDylib's name is unique, e.g. by calling LLVMOrcExecutionSessionGetJTIDylibByName first.

If a Platform is attached to the ExecutionSession then Platform::setupJITDylib will be called to install standard platform symbols (e.g. standard library interposes). If no Platform is installed then this call is equivalent to LLVMExecutionSessionRefCreateBareJITDylib and will always return success.

llgo:link (*OrcOpaqueExecutionSession).OrcExecutionSessionCreateJITDylib C.LLVMOrcExecutionSessionCreateJITDylib

func (*OrcOpaqueExecutionSession) OrcExecutionSessionGetJITDylibByName

func (self *OrcOpaqueExecutionSession) OrcExecutionSessionGetJITDylibByName(Name *c.Char) OrcJITDylibRef

Returns the JITDylib with the given name, or NULL if no such JITDylib exists.

llgo:link (*OrcOpaqueExecutionSession).OrcExecutionSessionGetJITDylibByName C.LLVMOrcExecutionSessionGetJITDylibByName

func (*OrcOpaqueExecutionSession) OrcExecutionSessionGetSymbolStringPool

func (self *OrcOpaqueExecutionSession) OrcExecutionSessionGetSymbolStringPool() OrcSymbolStringPoolRef

Return a reference to the SymbolStringPool for an ExecutionSession.

Ownership of the pool remains with the ExecutionSession: The caller is not required to free the pool.

llgo:link (*OrcOpaqueExecutionSession).OrcExecutionSessionGetSymbolStringPool C.LLVMOrcExecutionSessionGetSymbolStringPool

func (*OrcOpaqueExecutionSession) OrcExecutionSessionIntern

func (self *OrcOpaqueExecutionSession) OrcExecutionSessionIntern(Name *c.Char) OrcSymbolStringPoolEntryRef

Intern a string in the ExecutionSession's SymbolStringPool and return a reference to it. This increments the ref-count of the pool entry, and the returned value should be released once the client is done with it by calling LLVMOrcReleaseSymbolStringPoolEntry.

Since strings are uniqued within the SymbolStringPool LLVMOrcSymbolStringPoolEntryRefs can be compared by value to test string equality.

Note that this function does not perform linker-mangling on the string.

llgo:link (*OrcOpaqueExecutionSession).OrcExecutionSessionIntern C.LLVMOrcExecutionSessionIntern

type OrcOpaqueIRTransformLayer

type OrcOpaqueIRTransformLayer struct {
}

func (*OrcOpaqueIRTransformLayer) OrcIRTransformLayerEmit

llgo:link (*OrcOpaqueIRTransformLayer).OrcIRTransformLayerEmit C.LLVMOrcIRTransformLayerEmit

type OrcOpaqueIndirectStubsManager

type OrcOpaqueIndirectStubsManager struct {
}

func (*OrcOpaqueIndirectStubsManager) OrcDisposeIndirectStubsManager

func (self *OrcOpaqueIndirectStubsManager) OrcDisposeIndirectStubsManager()

Dispose of an IndirectStubsManager.

llgo:link (*OrcOpaqueIndirectStubsManager).OrcDisposeIndirectStubsManager C.LLVMOrcDisposeIndirectStubsManager

type OrcOpaqueJITDylib

type OrcOpaqueJITDylib struct {
}

func (*OrcOpaqueJITDylib) OrcJITDylibAddGenerator

func (self *OrcOpaqueJITDylib) OrcJITDylibAddGenerator(DG OrcDefinitionGeneratorRef)

Add a DefinitionGenerator to the given JITDylib.

The JITDylib will take ownership of the given generator: The client is no longer responsible for managing its memory.

llgo:link (*OrcOpaqueJITDylib).OrcJITDylibAddGenerator C.LLVMOrcJITDylibAddGenerator

func (*OrcOpaqueJITDylib) OrcJITDylibClear

func (self *OrcOpaqueJITDylib) OrcJITDylibClear() ErrorRef

Calls remove on all trackers associated with this JITDylib, see JITDylib::clear().

llgo:link (*OrcOpaqueJITDylib).OrcJITDylibClear C.LLVMOrcJITDylibClear

func (*OrcOpaqueJITDylib) OrcJITDylibCreateResourceTracker

func (self *OrcOpaqueJITDylib) OrcJITDylibCreateResourceTracker() OrcResourceTrackerRef

Return a reference to a newly created resource tracker associated with JD. The tracker is returned with an initial ref-count of 1, and must be released with LLVMOrcReleaseResourceTracker when no longer needed.

llgo:link (*OrcOpaqueJITDylib).OrcJITDylibCreateResourceTracker C.LLVMOrcJITDylibCreateResourceTracker

func (*OrcOpaqueJITDylib) OrcJITDylibDefine

func (self *OrcOpaqueJITDylib) OrcJITDylibDefine(MU OrcMaterializationUnitRef) ErrorRef

Add the given MaterializationUnit to the given JITDylib.

If this operation succeeds then JITDylib JD will take ownership of MU. If the operation fails then ownership remains with the caller who should call LLVMOrcDisposeMaterializationUnit to destroy it.

llgo:link (*OrcOpaqueJITDylib).OrcJITDylibDefine C.LLVMOrcJITDylibDefine

func (*OrcOpaqueJITDylib) OrcJITDylibGetDefaultResourceTracker

func (self *OrcOpaqueJITDylib) OrcJITDylibGetDefaultResourceTracker() OrcResourceTrackerRef

Return a reference to the default resource tracker for the given JITDylib. This operation will increase the retain count of the tracker: Clients should call LLVMOrcReleaseResourceTracker when the result is no longer needed.

llgo:link (*OrcOpaqueJITDylib).OrcJITDylibGetDefaultResourceTracker C.LLVMOrcJITDylibGetDefaultResourceTracker

type OrcOpaqueJITTargetMachineBuilder

type OrcOpaqueJITTargetMachineBuilder struct {
}

func (*OrcOpaqueJITTargetMachineBuilder) OrcDisposeJITTargetMachineBuilder

func (self *OrcOpaqueJITTargetMachineBuilder) OrcDisposeJITTargetMachineBuilder()

Dispose of a JITTargetMachineBuilder.

llgo:link (*OrcOpaqueJITTargetMachineBuilder).OrcDisposeJITTargetMachineBuilder C.LLVMOrcDisposeJITTargetMachineBuilder

func (*OrcOpaqueJITTargetMachineBuilder) OrcJITTargetMachineBuilderDetectHost

func (self *OrcOpaqueJITTargetMachineBuilder) OrcJITTargetMachineBuilderDetectHost() ErrorRef

Create a JITTargetMachineBuilder by detecting the host.

On success the client owns the resulting JITTargetMachineBuilder. It must be passed to a consuming operation (e.g. LLVMOrcLLJITBuilderSetJITTargetMachineBuilder) or disposed of by calling LLVMOrcDisposeJITTargetMachineBuilder.

llgo:link (*OrcOpaqueJITTargetMachineBuilder).OrcJITTargetMachineBuilderDetectHost C.LLVMOrcJITTargetMachineBuilderDetectHost

func (*OrcOpaqueJITTargetMachineBuilder) OrcJITTargetMachineBuilderGetTargetTriple

func (self *OrcOpaqueJITTargetMachineBuilder) OrcJITTargetMachineBuilderGetTargetTriple() *c.Char

Returns the target triple for the given JITTargetMachineBuilder as a string.

The caller owns the resulting string as must dispose of it by calling LLVMDisposeMessage

llgo:link (*OrcOpaqueJITTargetMachineBuilder).OrcJITTargetMachineBuilderGetTargetTriple C.LLVMOrcJITTargetMachineBuilderGetTargetTriple

func (*OrcOpaqueJITTargetMachineBuilder) OrcJITTargetMachineBuilderSetTargetTriple

func (self *OrcOpaqueJITTargetMachineBuilder) OrcJITTargetMachineBuilderSetTargetTriple(TargetTriple *c.Char)

Sets the target triple for the given JITTargetMachineBuilder to the given string.

llgo:link (*OrcOpaqueJITTargetMachineBuilder).OrcJITTargetMachineBuilderSetTargetTriple C.LLVMOrcJITTargetMachineBuilderSetTargetTriple

type OrcOpaqueLLJIT

type OrcOpaqueLLJIT struct {
}

func (*OrcOpaqueLLJIT) OrcCreateLLJIT

func (self *OrcOpaqueLLJIT) OrcCreateLLJIT(Builder OrcLLJITBuilderRef) ErrorRef

Create an LLJIT instance from an LLJITBuilder.

This operation takes ownership of the Builder argument: clients should not dispose of the builder after calling this function (even if the function returns an error). If a null Builder argument is provided then a default-constructed LLJITBuilder will be used.

On success the resulting LLJIT instance is uniquely owned by the client and automatically manages the memory of all JIT'd code and all modules that are transferred to it (e.g. via LLVMOrcLLJITAddLLVMIRModule). Disposing of the LLJIT instance will free all memory managed by the JIT, including JIT'd code and not-yet compiled modules.

llgo:link (*OrcOpaqueLLJIT).OrcCreateLLJIT C.LLVMOrcCreateLLJIT

func (*OrcOpaqueLLJIT) OrcDisposeLLJIT

func (self *OrcOpaqueLLJIT) OrcDisposeLLJIT() ErrorRef

Dispose of an LLJIT instance.

llgo:link (*OrcOpaqueLLJIT).OrcDisposeLLJIT C.LLVMOrcDisposeLLJIT

func (*OrcOpaqueLLJIT) OrcLLJITAddLLVMIRModule

func (self *OrcOpaqueLLJIT) OrcLLJITAddLLVMIRModule(JD OrcJITDylibRef, TSM OrcThreadSafeModuleRef) ErrorRef

Add an IR module to the given JITDylib in the given LLJIT instance. This operation transfers ownership of the TSM argument to the LLJIT instance. The TSM argument should not be disposed of or referenced once this function returns.

Resources associated with the given Module will be tracked by the given JITDylib's default resource tracker.

llgo:link (*OrcOpaqueLLJIT).OrcLLJITAddLLVMIRModule C.LLVMOrcLLJITAddLLVMIRModule

func (*OrcOpaqueLLJIT) OrcLLJITAddLLVMIRModuleWithRT

func (self *OrcOpaqueLLJIT) OrcLLJITAddLLVMIRModuleWithRT(JD OrcResourceTrackerRef, TSM OrcThreadSafeModuleRef) ErrorRef

Add an IR module to the given ResourceTracker's JITDylib in the given LLJIT instance. This operation transfers ownership of the TSM argument to the LLJIT instance. The TSM argument should not be disposed of or referenced once this function returns.

Resources associated with the given Module will be tracked by ResourceTracker RT.

llgo:link (*OrcOpaqueLLJIT).OrcLLJITAddLLVMIRModuleWithRT C.LLVMOrcLLJITAddLLVMIRModuleWithRT

func (*OrcOpaqueLLJIT) OrcLLJITAddObjectFile

func (self *OrcOpaqueLLJIT) OrcLLJITAddObjectFile(JD OrcJITDylibRef, ObjBuffer MemoryBufferRef) ErrorRef

Add a buffer representing an object file to the given JITDylib in the given LLJIT instance. This operation transfers ownership of the buffer to the LLJIT instance. The buffer should not be disposed of or referenced once this function returns.

Resources associated with the given object will be tracked by the given JITDylib's default resource tracker.

llgo:link (*OrcOpaqueLLJIT).OrcLLJITAddObjectFile C.LLVMOrcLLJITAddObjectFile

func (*OrcOpaqueLLJIT) OrcLLJITAddObjectFileWithRT

func (self *OrcOpaqueLLJIT) OrcLLJITAddObjectFileWithRT(RT OrcResourceTrackerRef, ObjBuffer MemoryBufferRef) ErrorRef

Add a buffer representing an object file to the given ResourceTracker's JITDylib in the given LLJIT instance. This operation transfers ownership of the buffer to the LLJIT instance. The buffer should not be disposed of or referenced once this function returns.

Resources associated with the given object will be tracked by ResourceTracker RT.

llgo:link (*OrcOpaqueLLJIT).OrcLLJITAddObjectFileWithRT C.LLVMOrcLLJITAddObjectFileWithRT

func (*OrcOpaqueLLJIT) OrcLLJITEnableDebugSupport

func (self *OrcOpaqueLLJIT) OrcLLJITEnableDebugSupport() ErrorRef

Install the plugin that submits debug objects to the executor. Executors must expose the llvm_orc_registerJITLoaderGDBAllocAction symbol.

llgo:link (*OrcOpaqueLLJIT).OrcLLJITEnableDebugSupport C.LLVMOrcLLJITEnableDebugSupport

func (*OrcOpaqueLLJIT) OrcLLJITGetDataLayoutStr

func (self *OrcOpaqueLLJIT) OrcLLJITGetDataLayoutStr() *c.Char

Get the LLJIT instance's default data layout string.

This string is owned by the LLJIT instance and does not need to be freed by the caller.

llgo:link (*OrcOpaqueLLJIT).OrcLLJITGetDataLayoutStr C.LLVMOrcLLJITGetDataLayoutStr

func (*OrcOpaqueLLJIT) OrcLLJITGetExecutionSession

func (self *OrcOpaqueLLJIT) OrcLLJITGetExecutionSession() OrcExecutionSessionRef

Get a reference to the ExecutionSession for this LLJIT instance.

The ExecutionSession is owned by the LLJIT instance. The client is not responsible for managing its memory.

llgo:link (*OrcOpaqueLLJIT).OrcLLJITGetExecutionSession C.LLVMOrcLLJITGetExecutionSession

func (*OrcOpaqueLLJIT) OrcLLJITGetGlobalPrefix

func (self *OrcOpaqueLLJIT) OrcLLJITGetGlobalPrefix() c.Char

Returns the global prefix character according to the LLJIT's DataLayout.

llgo:link (*OrcOpaqueLLJIT).OrcLLJITGetGlobalPrefix C.LLVMOrcLLJITGetGlobalPrefix

func (*OrcOpaqueLLJIT) OrcLLJITGetIRTransformLayer

func (self *OrcOpaqueLLJIT) OrcLLJITGetIRTransformLayer() OrcIRTransformLayerRef

Returns a non-owning reference to the LLJIT instance's IR transform layer.

llgo:link (*OrcOpaqueLLJIT).OrcLLJITGetIRTransformLayer C.LLVMOrcLLJITGetIRTransformLayer

func (*OrcOpaqueLLJIT) OrcLLJITGetMainJITDylib

func (self *OrcOpaqueLLJIT) OrcLLJITGetMainJITDylib() OrcJITDylibRef

Return a reference to the Main JITDylib.

The JITDylib is owned by the LLJIT instance. The client is not responsible for managing its memory.

llgo:link (*OrcOpaqueLLJIT).OrcLLJITGetMainJITDylib C.LLVMOrcLLJITGetMainJITDylib

func (*OrcOpaqueLLJIT) OrcLLJITGetObjLinkingLayer

func (self *OrcOpaqueLLJIT) OrcLLJITGetObjLinkingLayer() OrcObjectLayerRef

Returns a non-owning reference to the LLJIT instance's object linking layer.

llgo:link (*OrcOpaqueLLJIT).OrcLLJITGetObjLinkingLayer C.LLVMOrcLLJITGetObjLinkingLayer

func (*OrcOpaqueLLJIT) OrcLLJITGetObjTransformLayer

func (self *OrcOpaqueLLJIT) OrcLLJITGetObjTransformLayer() OrcObjectTransformLayerRef

Returns a non-owning reference to the LLJIT instance's object linking layer.

llgo:link (*OrcOpaqueLLJIT).OrcLLJITGetObjTransformLayer C.LLVMOrcLLJITGetObjTransformLayer

func (*OrcOpaqueLLJIT) OrcLLJITGetTripleString

func (self *OrcOpaqueLLJIT) OrcLLJITGetTripleString() *c.Char

Return the target triple for this LLJIT instance. This string is owned by the LLJIT instance and should not be freed by the client.

llgo:link (*OrcOpaqueLLJIT).OrcLLJITGetTripleString C.LLVMOrcLLJITGetTripleString

func (*OrcOpaqueLLJIT) OrcLLJITLookup

func (self *OrcOpaqueLLJIT) OrcLLJITLookup(Result *OrcExecutorAddress, Name *c.Char) ErrorRef

Look up the given symbol in the main JITDylib of the given LLJIT instance.

This operation does not take ownership of the Name argument.

llgo:link (*OrcOpaqueLLJIT).OrcLLJITLookup C.LLVMOrcLLJITLookup

func (*OrcOpaqueLLJIT) OrcLLJITMangleAndIntern

func (self *OrcOpaqueLLJIT) OrcLLJITMangleAndIntern(UnmangledName *c.Char) OrcSymbolStringPoolEntryRef

Mangles the given string according to the LLJIT instance's DataLayout, then interns the result in the SymbolStringPool and returns a reference to the pool entry. Clients should call LLVMOrcReleaseSymbolStringPoolEntry to decrement the ref-count on the pool entry once they are finished with this value.

llgo:link (*OrcOpaqueLLJIT).OrcLLJITMangleAndIntern C.LLVMOrcLLJITMangleAndIntern

type OrcOpaqueLLJITBuilder

type OrcOpaqueLLJITBuilder struct {
}

func (*OrcOpaqueLLJITBuilder) OrcDisposeLLJITBuilder

func (self *OrcOpaqueLLJITBuilder) OrcDisposeLLJITBuilder()

Dispose of an LLVMOrcLLJITBuilderRef. This should only be called if ownership has not been passed to LLVMOrcCreateLLJIT (e.g. because some error prevented that function from being called).

llgo:link (*OrcOpaqueLLJITBuilder).OrcDisposeLLJITBuilder C.LLVMOrcDisposeLLJITBuilder

func (*OrcOpaqueLLJITBuilder) OrcLLJITBuilderSetJITTargetMachineBuilder

func (self *OrcOpaqueLLJITBuilder) OrcLLJITBuilderSetJITTargetMachineBuilder(JTMB OrcJITTargetMachineBuilderRef)

Set the JITTargetMachineBuilder to be used when constructing the LLJIT instance. Calling this function is optional: if it is not called then the LLJITBuilder will use JITTargeTMachineBuilder::detectHost to construct a JITTargetMachineBuilder.

This function takes ownership of the JTMB argument: clients should not dispose of the JITTargetMachineBuilder after calling this function.

llgo:link (*OrcOpaqueLLJITBuilder).OrcLLJITBuilderSetJITTargetMachineBuilder C.LLVMOrcLLJITBuilderSetJITTargetMachineBuilder

type OrcOpaqueLazyCallThroughManager

type OrcOpaqueLazyCallThroughManager struct {
}

func (*OrcOpaqueLazyCallThroughManager) OrcDisposeLazyCallThroughManager

func (self *OrcOpaqueLazyCallThroughManager) OrcDisposeLazyCallThroughManager()

Dispose of an LazyCallThroughManager.

llgo:link (*OrcOpaqueLazyCallThroughManager).OrcDisposeLazyCallThroughManager C.LLVMOrcDisposeLazyCallThroughManager

func (*OrcOpaqueLazyCallThroughManager) OrcLazyReexports

Create a MaterializationUnit to define lazy re-expots. These are callable entry points that call through to the given symbols.

This function takes ownership of the CallableAliases array. The Name fields of the array elements are taken to have been retained for this function. This allows the following pattern...

size_t NumPairs;
LLVMOrcCSymbolAliasMapPairs CallableAliases;
-- Build CallableAliases array --
LLVMOrcMaterializationUnitRef MU =
   LLVMOrcLazyReexports(LCTM, ISM, JD, CallableAliases, NumPairs);

... without requiring cleanup of the elements of the CallableAliases array afterwards.

The client is still responsible for deleting the CallableAliases array itself.

If a client wishes to reuse elements of the CallableAliases array after this call they must explicitly retain each of the elements for themselves.

llgo:link (*OrcOpaqueLazyCallThroughManager).OrcLazyReexports C.LLVMOrcLazyReexports

type OrcOpaqueLookupState

type OrcOpaqueLookupState struct {
}

func (*OrcOpaqueLookupState) OrcLookupStateContinueLookup

func (self *OrcOpaqueLookupState) OrcLookupStateContinueLookup(Err ErrorRef)

Continue a lookup that was suspended in a generator (see LLVMOrcCAPIDefinitionGeneratorTryToGenerateFunction).

llgo:link (*OrcOpaqueLookupState).OrcLookupStateContinueLookup C.LLVMOrcLookupStateContinueLookup

type OrcOpaqueMaterializationResponsibility

type OrcOpaqueMaterializationResponsibility struct {
}

func (*OrcOpaqueMaterializationResponsibility) OrcDisposeMaterializationResponsibility

func (self *OrcOpaqueMaterializationResponsibility) OrcDisposeMaterializationResponsibility()

Disposes of the passed MaterializationResponsibility object.

This should only be done after the symbols covered by the object have either been resolved and emitted (via LLVMOrcMaterializationResponsibilityNotifyResolved and LLVMOrcMaterializationResponsibilityNotifyEmitted) or failed (via LLVMOrcMaterializationResponsibilityFailMaterialization).

llgo:link (*OrcOpaqueMaterializationResponsibility).OrcDisposeMaterializationResponsibility C.LLVMOrcDisposeMaterializationResponsibility

func (*OrcOpaqueMaterializationResponsibility) OrcMaterializationResponsibilityDefineMaterializing

func (self *OrcOpaqueMaterializationResponsibility) OrcMaterializationResponsibilityDefineMaterializing(Pairs OrcCSymbolFlagsMapPairs, NumPairs c.SizeT) ErrorRef

Attempt to claim responsibility for new definitions. This method can be used to claim responsibility for symbols that are added to a materialization unit during the compilation process (e.g. literal pool symbols). Symbol linkage rules are the same as for symbols that are defined up front: duplicate strong definitions will result in errors. Duplicate weak definitions will be discarded (in which case they will not be added to this responsibility instance).

This method can be used by materialization units that want to add additional symbols at materialization time (e.g. stubs, compile callbacks, metadata)

llgo:link (*OrcOpaqueMaterializationResponsibility).OrcMaterializationResponsibilityDefineMaterializing C.LLVMOrcMaterializationResponsibilityDefineMaterializing

func (*OrcOpaqueMaterializationResponsibility) OrcMaterializationResponsibilityDelegate

func (self *OrcOpaqueMaterializationResponsibility) OrcMaterializationResponsibilityDelegate(Symbols *OrcSymbolStringPoolEntryRef, NumSymbols c.SizeT, Result *OrcMaterializationResponsibilityRef) ErrorRef

Delegates responsibility for the given symbols to the returned materialization responsibility. Useful for breaking up work between threads, or different kinds of materialization processes.

The caller retains responsibility of the the passed MaterializationResponsibility.

llgo:link (*OrcOpaqueMaterializationResponsibility).OrcMaterializationResponsibilityDelegate C.LLVMOrcMaterializationResponsibilityDelegate

func (*OrcOpaqueMaterializationResponsibility) OrcMaterializationResponsibilityFailMaterialization

func (self *OrcOpaqueMaterializationResponsibility) OrcMaterializationResponsibilityFailMaterialization()

Notify all not-yet-emitted covered by this MaterializationResponsibility instance that an error has occurred. This will remove all symbols covered by this MaterializationResponsibility from the target JITDylib, and send an error to any queries waiting on these symbols.

llgo:link (*OrcOpaqueMaterializationResponsibility).OrcMaterializationResponsibilityFailMaterialization C.LLVMOrcMaterializationResponsibilityFailMaterialization

func (*OrcOpaqueMaterializationResponsibility) OrcMaterializationResponsibilityGetExecutionSession

func (self *OrcOpaqueMaterializationResponsibility) OrcMaterializationResponsibilityGetExecutionSession() OrcExecutionSessionRef

Returns the ExecutionSession for this MaterializationResponsibility.

llgo:link (*OrcOpaqueMaterializationResponsibility).OrcMaterializationResponsibilityGetExecutionSession C.LLVMOrcMaterializationResponsibilityGetExecutionSession

func (*OrcOpaqueMaterializationResponsibility) OrcMaterializationResponsibilityGetInitializerSymbol

func (self *OrcOpaqueMaterializationResponsibility) OrcMaterializationResponsibilityGetInitializerSymbol() OrcSymbolStringPoolEntryRef

Returns the initialization pseudo-symbol, if any. This symbol will also be present in the SymbolFlagsMap for this MaterializationResponsibility object.

The returned symbol is not retained over any mutating operation of the MaterializationResponsbility or beyond the lifetime thereof.

llgo:link (*OrcOpaqueMaterializationResponsibility).OrcMaterializationResponsibilityGetInitializerSymbol C.LLVMOrcMaterializationResponsibilityGetInitializerSymbol

func (*OrcOpaqueMaterializationResponsibility) OrcMaterializationResponsibilityGetRequestedSymbols

func (self *OrcOpaqueMaterializationResponsibility) OrcMaterializationResponsibilityGetRequestedSymbols(NumSymbols *c.SizeT) *OrcSymbolStringPoolEntryRef

Returns the names of any symbols covered by this MaterializationResponsibility object that have queries pending. This information can be used to return responsibility for unrequested symbols back to the JITDylib via the delegate method.

llgo:link (*OrcOpaqueMaterializationResponsibility).OrcMaterializationResponsibilityGetRequestedSymbols C.LLVMOrcMaterializationResponsibilityGetRequestedSymbols

func (*OrcOpaqueMaterializationResponsibility) OrcMaterializationResponsibilityGetSymbols

func (self *OrcOpaqueMaterializationResponsibility) OrcMaterializationResponsibilityGetSymbols(NumPairs *c.SizeT) OrcCSymbolFlagsMapPairs

Returns the symbol flags map for this responsibility instance.

The length of the array is returned in NumPairs and the caller is responsible for the returned memory and needs to call LLVMOrcDisposeCSymbolFlagsMap.

To use the returned symbols beyond the livetime of the MaterializationResponsibility requires the caller to retain the symbols explicitly.

llgo:link (*OrcOpaqueMaterializationResponsibility).OrcMaterializationResponsibilityGetSymbols C.LLVMOrcMaterializationResponsibilityGetSymbols

func (*OrcOpaqueMaterializationResponsibility) OrcMaterializationResponsibilityGetTargetDylib

func (self *OrcOpaqueMaterializationResponsibility) OrcMaterializationResponsibilityGetTargetDylib() OrcJITDylibRef

Returns the target JITDylib that these symbols are being materialized into.

llgo:link (*OrcOpaqueMaterializationResponsibility).OrcMaterializationResponsibilityGetTargetDylib C.LLVMOrcMaterializationResponsibilityGetTargetDylib

func (*OrcOpaqueMaterializationResponsibility) OrcMaterializationResponsibilityNotifyEmitted

func (self *OrcOpaqueMaterializationResponsibility) OrcMaterializationResponsibilityNotifyEmitted(SymbolDepGroups *OrcCSymbolDependenceGroup, NumSymbolDepGroups c.SizeT) ErrorRef

Notifies the target JITDylib (and any pending queries on that JITDylib) that all symbols covered by this MaterializationResponsibility instance have been emitted.

This function takes ownership of the symbols in the Dependencies struct. This allows the following pattern...

LLVMOrcSymbolStringPoolEntryRef Names[] = {...};
LLVMOrcCDependenceMapPair Dependence = {JD, {Names, sizeof(Names)}}
LLVMOrcMaterializationResponsibilityAddDependencies(JD, Name, &Dependence,

1);

... without requiring cleanup of the elements of the Names array afterwards.

The client is still responsible for deleting the Dependencies.Names arrays, and the Dependencies array itself.

This method will return an error if any symbols being resolved have been moved to the error state due to the failure of a dependency. If this method returns an error then clients should log it and call LLVMOrcMaterializationResponsibilityFailMaterialization. If no dependencies have been registered for the symbols covered by this MaterializationResponsibility then this method is guaranteed to return LLVMErrorSuccess.

llgo:link (*OrcOpaqueMaterializationResponsibility).OrcMaterializationResponsibilityNotifyEmitted C.LLVMOrcMaterializationResponsibilityNotifyEmitted

func (*OrcOpaqueMaterializationResponsibility) OrcMaterializationResponsibilityNotifyResolved

func (self *OrcOpaqueMaterializationResponsibility) OrcMaterializationResponsibilityNotifyResolved(Symbols OrcCSymbolMapPairs, NumPairs c.SizeT) ErrorRef

Notifies the target JITDylib that the given symbols have been resolved. This will update the given symbols' addresses in the JITDylib, and notify any pending queries on the given symbols of their resolution. The given symbols must be ones covered by this MaterializationResponsibility instance. Individual calls to this method may resolve a subset of the symbols, but all symbols must have been resolved prior to calling emit.

This method will return an error if any symbols being resolved have been moved to the error state due to the failure of a dependency. If this method returns an error then clients should log it and call LLVMOrcMaterializationResponsibilityFailMaterialization. If no dependencies have been registered for the symbols covered by this MaterializationResponsibility then this method is guaranteed to return LLVMErrorSuccess.

llgo:link (*OrcOpaqueMaterializationResponsibility).OrcMaterializationResponsibilityNotifyResolved C.LLVMOrcMaterializationResponsibilityNotifyResolved

func (*OrcOpaqueMaterializationResponsibility) OrcMaterializationResponsibilityReplace

func (self *OrcOpaqueMaterializationResponsibility) OrcMaterializationResponsibilityReplace(MU OrcMaterializationUnitRef) ErrorRef

Transfers responsibility to the given MaterializationUnit for all symbols defined by that MaterializationUnit. This allows materializers to break up work based on run-time information (e.g. by introspecting which symbols have actually been looked up and materializing only those).

llgo:link (*OrcOpaqueMaterializationResponsibility).OrcMaterializationResponsibilityReplace C.LLVMOrcMaterializationResponsibilityReplace

type OrcOpaqueMaterializationUnit

type OrcOpaqueMaterializationUnit struct {
}

func (*OrcOpaqueMaterializationUnit) OrcDisposeMaterializationUnit

func (self *OrcOpaqueMaterializationUnit) OrcDisposeMaterializationUnit()

Dispose of a MaterializationUnit.

llgo:link (*OrcOpaqueMaterializationUnit).OrcDisposeMaterializationUnit C.LLVMOrcDisposeMaterializationUnit

type OrcOpaqueObjectLayer

type OrcOpaqueObjectLayer struct {
}

func (*OrcOpaqueObjectLayer) OrcCreateObjectLinkingLayerWithInProcessMemoryManager

func (self *OrcOpaqueObjectLayer) OrcCreateObjectLinkingLayerWithInProcessMemoryManager(ES OrcExecutionSessionRef) ErrorRef

Create a ObjectLinkingLayer instance using the standard JITLink InProcessMemoryManager for memory management.

llgo:link (*OrcOpaqueObjectLayer).OrcCreateObjectLinkingLayerWithInProcessMemoryManager C.LLVMOrcCreateObjectLinkingLayerWithInProcessMemoryManager

func (*OrcOpaqueObjectLayer) OrcDisposeObjectLayer

func (self *OrcOpaqueObjectLayer) OrcDisposeObjectLayer()

Dispose of an ObjectLayer.

llgo:link (*OrcOpaqueObjectLayer).OrcDisposeObjectLayer C.LLVMOrcDisposeObjectLayer

func (*OrcOpaqueObjectLayer) OrcObjectLayerAddObjectFile

func (self *OrcOpaqueObjectLayer) OrcObjectLayerAddObjectFile(JD OrcJITDylibRef, ObjBuffer MemoryBufferRef) ErrorRef

Add an object to an ObjectLayer to the given JITDylib.

Adds a buffer representing an object file to the given JITDylib using the given ObjectLayer instance. This operation transfers ownership of the buffer to the ObjectLayer instance. The buffer should not be disposed of or referenced once this function returns.

Resources associated with the given object will be tracked by the given JITDylib's default ResourceTracker.

llgo:link (*OrcOpaqueObjectLayer).OrcObjectLayerAddObjectFile C.LLVMOrcObjectLayerAddObjectFile

func (*OrcOpaqueObjectLayer) OrcObjectLayerAddObjectFileWithRT

func (self *OrcOpaqueObjectLayer) OrcObjectLayerAddObjectFileWithRT(RT OrcResourceTrackerRef, ObjBuffer MemoryBufferRef) ErrorRef

Add an object to an ObjectLayer using the given ResourceTracker.

Adds a buffer representing an object file to the given ResourceTracker's JITDylib using the given ObjectLayer instance. This operation transfers ownership of the buffer to the ObjectLayer instance. The buffer should not be disposed of or referenced once this function returns.

Resources associated with the given object will be tracked by ResourceTracker RT.

llgo:link (*OrcOpaqueObjectLayer).OrcObjectLayerAddObjectFileWithRT C.LLVMOrcObjectLayerAddObjectFileWithRT

func (*OrcOpaqueObjectLayer) OrcObjectLayerEmit

func (self *OrcOpaqueObjectLayer) OrcObjectLayerEmit(R OrcMaterializationResponsibilityRef, ObjBuffer MemoryBufferRef)

Emit an object buffer to an ObjectLayer.

Ownership of the responsibility object and object buffer pass to this function. The client is not responsible for cleanup.

llgo:link (*OrcOpaqueObjectLayer).OrcObjectLayerEmit C.LLVMOrcObjectLayerEmit

func (*OrcOpaqueObjectLayer) OrcRTDyldObjectLinkingLayerRegisterJITEventListener

func (self *OrcOpaqueObjectLayer) OrcRTDyldObjectLinkingLayerRegisterJITEventListener(Listener JITEventListenerRef)

Add the given listener to the given RTDyldObjectLinkingLayer.

Note: Layer must be an RTDyldObjectLinkingLayer instance or behavior is undefined.

llgo:link (*OrcOpaqueObjectLayer).OrcRTDyldObjectLinkingLayerRegisterJITEventListener C.LLVMOrcRTDyldObjectLinkingLayerRegisterJITEventListener

type OrcOpaqueObjectLinkingLayer

type OrcOpaqueObjectLinkingLayer struct {
}

type OrcOpaqueObjectTransformLayer

type OrcOpaqueObjectTransformLayer struct {
}

type OrcOpaqueResourceTracker

type OrcOpaqueResourceTracker struct {
}

func (*OrcOpaqueResourceTracker) OrcReleaseResourceTracker

func (self *OrcOpaqueResourceTracker) OrcReleaseResourceTracker()

Reduces the ref-count of a ResourceTracker.

llgo:link (*OrcOpaqueResourceTracker).OrcReleaseResourceTracker C.LLVMOrcReleaseResourceTracker

func (*OrcOpaqueResourceTracker) OrcResourceTrackerRemove

func (self *OrcOpaqueResourceTracker) OrcResourceTrackerRemove() ErrorRef

Remove all resources associated with the given tracker. See ResourceTracker::remove().

llgo:link (*OrcOpaqueResourceTracker).OrcResourceTrackerRemove C.LLVMOrcResourceTrackerRemove

type OrcOpaqueSymbolStringPool

type OrcOpaqueSymbolStringPool struct {
}

func (*OrcOpaqueSymbolStringPool) OrcSymbolStringPoolClearDeadEntries

func (self *OrcOpaqueSymbolStringPool) OrcSymbolStringPoolClearDeadEntries()

Clear all unreferenced symbol string pool entries.

This can be called at any time to release unused entries in the ExecutionSession's string pool. Since it locks the pool (preventing interning of any new strings) it is recommended that it only be called infrequently, ideally when the caller has reason to believe that some entries will have become unreferenced, e.g. after removing a module or closing a JITDylib.

llgo:link (*OrcOpaqueSymbolStringPool).OrcSymbolStringPoolClearDeadEntries C.LLVMOrcSymbolStringPoolClearDeadEntries

type OrcOpaqueSymbolStringPoolEntry

type OrcOpaqueSymbolStringPoolEntry struct {
}

func (*OrcOpaqueSymbolStringPoolEntry) OrcDisposeSymbols

func (self *OrcOpaqueSymbolStringPoolEntry) OrcDisposeSymbols()

Disposes of the passed LLVMOrcSymbolStringPoolEntryRef* .

Does not release the symbols themselves.

llgo:link (*OrcOpaqueSymbolStringPoolEntry).OrcDisposeSymbols C.LLVMOrcDisposeSymbols

func (*OrcOpaqueSymbolStringPoolEntry) OrcReleaseSymbolStringPoolEntry

func (self *OrcOpaqueSymbolStringPoolEntry) OrcReleaseSymbolStringPoolEntry()

Reduces the ref-count for of a SymbolStringPool entry.

llgo:link (*OrcOpaqueSymbolStringPoolEntry).OrcReleaseSymbolStringPoolEntry C.LLVMOrcReleaseSymbolStringPoolEntry

func (*OrcOpaqueSymbolStringPoolEntry) OrcRetainSymbolStringPoolEntry

func (self *OrcOpaqueSymbolStringPoolEntry) OrcRetainSymbolStringPoolEntry()

Increments the ref-count for a SymbolStringPool entry.

llgo:link (*OrcOpaqueSymbolStringPoolEntry).OrcRetainSymbolStringPoolEntry C.LLVMOrcRetainSymbolStringPoolEntry

func (*OrcOpaqueSymbolStringPoolEntry) OrcSymbolStringPoolEntryStr

func (self *OrcOpaqueSymbolStringPoolEntry) OrcSymbolStringPoolEntryStr() *c.Char

Return the c-string for the given symbol. This string will remain valid until the entry is freed (once all LLVMOrcSymbolStringPoolEntryRefs have been released).

llgo:link (*OrcOpaqueSymbolStringPoolEntry).OrcSymbolStringPoolEntryStr C.LLVMOrcSymbolStringPoolEntryStr

type OrcOpaqueThreadSafeContext

type OrcOpaqueThreadSafeContext struct {
}

func (*OrcOpaqueThreadSafeContext) OrcDisposeThreadSafeContext

func (self *OrcOpaqueThreadSafeContext) OrcDisposeThreadSafeContext()

Dispose of a ThreadSafeContext.

llgo:link (*OrcOpaqueThreadSafeContext).OrcDisposeThreadSafeContext C.LLVMOrcDisposeThreadSafeContext

type OrcOpaqueThreadSafeModule

type OrcOpaqueThreadSafeModule struct {
}

func (*OrcOpaqueThreadSafeModule) OrcDisposeThreadSafeModule

func (self *OrcOpaqueThreadSafeModule) OrcDisposeThreadSafeModule()

Dispose of a ThreadSafeModule. This should only be called if ownership has not been passed to LLJIT (e.g. because some error prevented the client from adding this to the JIT).

llgo:link (*OrcOpaqueThreadSafeModule).OrcDisposeThreadSafeModule C.LLVMOrcDisposeThreadSafeModule

type OrcResourceTrackerRef

type OrcResourceTrackerRef = *OrcOpaqueResourceTracker

A reference to an orc::ResourceTracker instance.

type OrcSymbolLookupFlags

type OrcSymbolLookupFlags c.Int

Symbol lookup flags for lookup sets. This should be kept in sync with llvm::orc::SymbolLookupFlags.

const (
	OrcSymbolLookupFlagsRequiredSymbol         OrcSymbolLookupFlags = 0
	OrcSymbolLookupFlagsWeaklyReferencedSymbol OrcSymbolLookupFlags = 1
)

type OrcSymbolPredicate

type OrcSymbolPredicate = func(_llcppg_param1 unsafe.Pointer, _llcppg_param2 OrcSymbolStringPoolEntryRef) c.Int

Predicate function for SymbolStringPoolEntries.

llgo:type C

type OrcSymbolStringPoolEntryRef

type OrcSymbolStringPoolEntryRef = *OrcOpaqueSymbolStringPoolEntry

A reference to an orc::SymbolStringPool table entry.

type OrcSymbolStringPoolRef

type OrcSymbolStringPoolRef = *OrcOpaqueSymbolStringPool

A reference to an orc::SymbolStringPool.

type OrcThreadSafeContextRef

type OrcThreadSafeContextRef = *OrcOpaqueThreadSafeContext

A reference to an orc::ThreadSafeContext instance.

func OrcCreateNewThreadSafeContext

func OrcCreateNewThreadSafeContext() OrcThreadSafeContextRef

Create a ThreadSafeContextRef containing a new LLVMContext.

Ownership of the underlying ThreadSafeContext data is shared: Clients can and should dispose of their ThreadSafeContextRef as soon as they no longer need to refer to it directly. Other references (e.g. from ThreadSafeModules) will keep the underlying data alive as long as it is needed.

type OrcThreadSafeModuleRef

type OrcThreadSafeModuleRef = *OrcOpaqueThreadSafeModule

A reference to an orc::ThreadSafeModule instance.

type PassBuilderOptionsRef added in v0.2.0

type PassBuilderOptionsRef = *OpaquePassBuilderOptions

A set of options passed which are attached to the Pass Manager upon run.

This corresponds to an llvm::LLVMPassBuilderOptions instance

The details for how the different properties of this structure are used can be found in the source for LLVMRunPasses

func CreatePassBuilderOptions added in v0.2.0

func CreatePassBuilderOptions() PassBuilderOptionsRef

Create a new set of options for a PassBuilder

Ownership of the returned instance is given to the client, and they are responsible for it. The client should call LLVMDisposePassBuilderOptions to free the pass builder options.

type PassManagerRef

type PassManagerRef = *OpaquePassManager

@see llvm::PassManagerBase

func CreatePassManager

func CreatePassManager() PassManagerRef

Constructs a new whole-module pass pipeline. This type of pipeline is suitable for link-time optimization and whole-module transformations. @see llvm::PassManager::PassManager

type RealPredicate

type RealPredicate c.Int
const (
	// < Always false (always folded)
	RealPredicateFalse RealPredicate = 0
	// < True if ordered and equal
	RealOEQ RealPredicate = 1
	// < True if ordered and greater than
	RealOGT RealPredicate = 2
	// < True if ordered and greater than or equal
	RealOGE RealPredicate = 3
	// < True if ordered and less than
	RealOLT RealPredicate = 4
	// < True if ordered and less than or equal
	RealOLE RealPredicate = 5
	// < True if ordered and operands are unequal
	RealONE RealPredicate = 6
	// < True if ordered (no nans)
	RealORD RealPredicate = 7
	// < True if unordered: isnan(X) | isnan(Y)
	RealUNO RealPredicate = 8
	// < True if unordered or equal
	RealUEQ RealPredicate = 9
	// < True if unordered or greater than
	RealUGT RealPredicate = 10
	// < True if unordered, greater than, or equal
	RealUGE RealPredicate = 11
	// < True if unordered or less than
	RealULT RealPredicate = 12
	// < True if unordered, less than, or equal
	RealULE RealPredicate = 13
	// < True if unordered or not equal
	RealUNE RealPredicate = 14
	// < Always true (always folded)
	RealPredicateTrue RealPredicate = 15
)

type RelocMode

type RelocMode c.Int
const (
	RelocDefault      RelocMode = 0
	RelocStatic       RelocMode = 1
	RelocPIC          RelocMode = 2
	RelocDynamicNoPic RelocMode = 3
	RelocROPI         RelocMode = 4
	RelocRWPI         RelocMode = 5
	RelocROPI_RWPI    RelocMode = 6
)

type RelocationIteratorRef

type RelocationIteratorRef = *OpaqueRelocationIterator

type RemarkArgRef

type RemarkArgRef = *RemarkOpaqueArg

Element of the "Args" list. The key might give more information about what the semantics of the value are, e.g. "Callee" will tell you that the value is a symbol that names a function.

\since REMARKS_API_VERSION=0

type RemarkDebugLocRef

type RemarkDebugLocRef = *RemarkOpaqueDebugLoc

DebugLoc containing File, Line and Column.

\since REMARKS_API_VERSION=0

type RemarkEntryRef

type RemarkEntryRef = *RemarkOpaqueEntry

A remark emitted by the compiler.

\since REMARKS_API_VERSION=0

type RemarkOpaqueArg

type RemarkOpaqueArg struct {
}

func (*RemarkOpaqueArg) RemarkArgGetDebugLoc

func (self *RemarkOpaqueArg) RemarkArgGetDebugLoc() RemarkDebugLocRef

Returns the debug location that is attached to the value of this argument.

If there is no debug location, the return value will be `NULL`.

\since REMARKS_API_VERSION=0

llgo:link (*RemarkOpaqueArg).RemarkArgGetDebugLoc C.LLVMRemarkArgGetDebugLoc

func (*RemarkOpaqueArg) RemarkArgGetKey

func (self *RemarkOpaqueArg) RemarkArgGetKey() RemarkStringRef

Returns the key of an argument. The key defines what the value is, and the same key can appear multiple times in the list of arguments.

\since REMARKS_API_VERSION=0

llgo:link (*RemarkOpaqueArg).RemarkArgGetKey C.LLVMRemarkArgGetKey

func (*RemarkOpaqueArg) RemarkArgGetValue

func (self *RemarkOpaqueArg) RemarkArgGetValue() RemarkStringRef

Returns the value of an argument. This is a string that can contain newlines.

\since REMARKS_API_VERSION=0

llgo:link (*RemarkOpaqueArg).RemarkArgGetValue C.LLVMRemarkArgGetValue

func (*RemarkOpaqueArg) RemarkEntryGetNextArg

func (self *RemarkOpaqueArg) RemarkEntryGetNextArg(Remark RemarkEntryRef) RemarkArgRef

Get the next argument in \p Remark from the position of \p It.

Returns `NULL` if there are no more arguments available.

The lifetime of the returned value is bound to the lifetime of \p Remark.

\since REMARKS_API_VERSION=0

llgo:link (*RemarkOpaqueArg).RemarkEntryGetNextArg C.LLVMRemarkEntryGetNextArg

type RemarkOpaqueDebugLoc

type RemarkOpaqueDebugLoc struct {
}

func (*RemarkOpaqueDebugLoc) RemarkDebugLocGetSourceColumn

func (self *RemarkOpaqueDebugLoc) RemarkDebugLocGetSourceColumn() c.Uint32T

Return the column in the source file for a debug location.

\since REMARKS_API_VERSION=0

llgo:link (*RemarkOpaqueDebugLoc).RemarkDebugLocGetSourceColumn C.LLVMRemarkDebugLocGetSourceColumn

func (*RemarkOpaqueDebugLoc) RemarkDebugLocGetSourceFilePath

func (self *RemarkOpaqueDebugLoc) RemarkDebugLocGetSourceFilePath() RemarkStringRef

Return the path to the source file for a debug location.

\since REMARKS_API_VERSION=0

llgo:link (*RemarkOpaqueDebugLoc).RemarkDebugLocGetSourceFilePath C.LLVMRemarkDebugLocGetSourceFilePath

func (*RemarkOpaqueDebugLoc) RemarkDebugLocGetSourceLine

func (self *RemarkOpaqueDebugLoc) RemarkDebugLocGetSourceLine() c.Uint32T

Return the line in the source file for a debug location.

\since REMARKS_API_VERSION=0

llgo:link (*RemarkOpaqueDebugLoc).RemarkDebugLocGetSourceLine C.LLVMRemarkDebugLocGetSourceLine

type RemarkOpaqueEntry

type RemarkOpaqueEntry struct {
}

func (*RemarkOpaqueEntry) RemarkEntryDispose

func (self *RemarkOpaqueEntry) RemarkEntryDispose()

Free the resources used by the remark entry.

\since REMARKS_API_VERSION=0

llgo:link (*RemarkOpaqueEntry).RemarkEntryDispose C.LLVMRemarkEntryDispose

func (*RemarkOpaqueEntry) RemarkEntryGetDebugLoc

func (self *RemarkOpaqueEntry) RemarkEntryGetDebugLoc() RemarkDebugLocRef

Returns the debug location that is attached to this remark.

If there is no debug location, the return value will be `NULL`.

\since REMARKS_API_VERSION=0

llgo:link (*RemarkOpaqueEntry).RemarkEntryGetDebugLoc C.LLVMRemarkEntryGetDebugLoc

func (*RemarkOpaqueEntry) RemarkEntryGetFirstArg

func (self *RemarkOpaqueEntry) RemarkEntryGetFirstArg() RemarkArgRef

Get a new iterator to iterate over a remark's argument.

If there are no arguments in \p Remark, the return value will be `NULL`.

The lifetime of the returned value is bound to the lifetime of \p Remark.

\since REMARKS_API_VERSION=0

llgo:link (*RemarkOpaqueEntry).RemarkEntryGetFirstArg C.LLVMRemarkEntryGetFirstArg

func (*RemarkOpaqueEntry) RemarkEntryGetFunctionName

func (self *RemarkOpaqueEntry) RemarkEntryGetFunctionName() RemarkStringRef

Get the name of the function being processed when the remark was emitted.

\since REMARKS_API_VERSION=0

llgo:link (*RemarkOpaqueEntry).RemarkEntryGetFunctionName C.LLVMRemarkEntryGetFunctionName

func (*RemarkOpaqueEntry) RemarkEntryGetHotness

func (self *RemarkOpaqueEntry) RemarkEntryGetHotness() c.Uint64T

Return the hotness of the remark.

A hotness of `0` means this value is not set.

\since REMARKS_API_VERSION=0

llgo:link (*RemarkOpaqueEntry).RemarkEntryGetHotness C.LLVMRemarkEntryGetHotness

func (*RemarkOpaqueEntry) RemarkEntryGetNumArgs

func (self *RemarkOpaqueEntry) RemarkEntryGetNumArgs() c.Uint32T

The number of arguments the remark holds.

\since REMARKS_API_VERSION=0

llgo:link (*RemarkOpaqueEntry).RemarkEntryGetNumArgs C.LLVMRemarkEntryGetNumArgs

func (*RemarkOpaqueEntry) RemarkEntryGetPassName

func (self *RemarkOpaqueEntry) RemarkEntryGetPassName() RemarkStringRef

Get the name of the pass that emitted this remark.

\since REMARKS_API_VERSION=0

llgo:link (*RemarkOpaqueEntry).RemarkEntryGetPassName C.LLVMRemarkEntryGetPassName

func (*RemarkOpaqueEntry) RemarkEntryGetRemarkName

func (self *RemarkOpaqueEntry) RemarkEntryGetRemarkName() RemarkStringRef

Get an identifier of the remark.

\since REMARKS_API_VERSION=0

llgo:link (*RemarkOpaqueEntry).RemarkEntryGetRemarkName C.LLVMRemarkEntryGetRemarkName

func (*RemarkOpaqueEntry) RemarkEntryGetType

func (self *RemarkOpaqueEntry) RemarkEntryGetType() RemarkType

The type of the remark. For example, it can allow users to only keep the missed optimizations from the compiler.

\since REMARKS_API_VERSION=0

llgo:link (*RemarkOpaqueEntry).RemarkEntryGetType C.LLVMRemarkEntryGetType

type RemarkOpaqueParser

type RemarkOpaqueParser struct {
}

func (*RemarkOpaqueParser) RemarkParserDispose

func (self *RemarkOpaqueParser) RemarkParserDispose()

Releases all the resources used by \p Parser.

\since REMARKS_API_VERSION=0

llgo:link (*RemarkOpaqueParser).RemarkParserDispose C.LLVMRemarkParserDispose

func (*RemarkOpaqueParser) RemarkParserGetErrorMessage

func (self *RemarkOpaqueParser) RemarkParserGetErrorMessage() *c.Char

Returns a null-terminated string containing an error message.

In case of no error, the result is `NULL`.

The memory of the string is bound to the lifetime of \p Parser. If LLVMRemarkParserDispose() is called, the memory of the string will be released.

\since REMARKS_API_VERSION=0

llgo:link (*RemarkOpaqueParser).RemarkParserGetErrorMessage C.LLVMRemarkParserGetErrorMessage

func (*RemarkOpaqueParser) RemarkParserGetNext

func (self *RemarkOpaqueParser) RemarkParserGetNext() RemarkEntryRef

Returns the next remark in the file.

The value pointed to by the return value needs to be disposed using a call to LLVMRemarkEntryDispose().

All the entries in the returned value that are of LLVMRemarkStringRef type will become invalidated once a call to LLVMRemarkParserDispose is made.

If the parser reaches the end of the buffer, the return value will be `NULL`.

In the case of an error, the return value will be `NULL`, and:

1) LLVMRemarkParserHasError() will return `1`.

  1. LLVMRemarkParserGetErrorMessage() will return a descriptive error message.

An error may occur if:

1) An argument is invalid.

2) There is a parsing error. This can occur on things like malformed YAML.

  1. There is a Remark semantic error. This can occur on well-formed files with missing or extra fields.

Here is a quick example of the usage:

``` LLVMRemarkParserRef Parser = LLVMRemarkParserCreateYAML(Buf, Size); LLVMRemarkEntryRef Remark = NULL;

while ((Remark = LLVMRemarkParserGetNext(Parser))) {
   // use Remark
   LLVMRemarkEntryDispose(Remark); // Release memory.
}

bool HasError = LLVMRemarkParserHasError(Parser); LLVMRemarkParserDispose(Parser); ```

\since REMARKS_API_VERSION=0

llgo:link (*RemarkOpaqueParser).RemarkParserGetNext C.LLVMRemarkParserGetNext

func (*RemarkOpaqueParser) RemarkParserHasError

func (self *RemarkOpaqueParser) RemarkParserHasError() Bool

Returns `1` if the parser encountered an error while parsing the buffer.

\since REMARKS_API_VERSION=0

llgo:link (*RemarkOpaqueParser).RemarkParserHasError C.LLVMRemarkParserHasError

type RemarkOpaqueString

type RemarkOpaqueString struct {
}

func (*RemarkOpaqueString) RemarkStringGetData

func (self *RemarkOpaqueString) RemarkStringGetData() *c.Char

Returns the buffer holding the string.

\since REMARKS_API_VERSION=0

llgo:link (*RemarkOpaqueString).RemarkStringGetData C.LLVMRemarkStringGetData

func (*RemarkOpaqueString) RemarkStringGetLen

func (self *RemarkOpaqueString) RemarkStringGetLen() c.Uint32T

Returns the size of the string.

\since REMARKS_API_VERSION=0

llgo:link (*RemarkOpaqueString).RemarkStringGetLen C.LLVMRemarkStringGetLen

type RemarkParserRef

type RemarkParserRef = *RemarkOpaqueParser

func RemarkParserCreateBitstream

func RemarkParserCreateBitstream(Buf unsafe.Pointer, Size c.Uint64T) RemarkParserRef

Creates a remark parser that can be used to parse the buffer located in \p Buf of size \p Size bytes.

\p Buf cannot be `NULL`.

This function should be paired with LLVMRemarkParserDispose() to avoid leaking resources.

\since REMARKS_API_VERSION=1

func RemarkParserCreateYAML

func RemarkParserCreateYAML(Buf unsafe.Pointer, Size c.Uint64T) RemarkParserRef

Creates a remark parser that can be used to parse the buffer located in \p Buf of size \p Size bytes.

\p Buf cannot be `NULL`.

This function should be paired with LLVMRemarkParserDispose() to avoid leaking resources.

\since REMARKS_API_VERSION=0

type RemarkStringRef

type RemarkStringRef = *RemarkOpaqueString

String containing a buffer and a length. The buffer is not guaranteed to be zero-terminated.

\since REMARKS_API_VERSION=0

type RemarkType

type RemarkType c.Int

The type of the emitted remark.

const (
	RemarkTypeUnknown           RemarkType = 0
	RemarkTypePassed            RemarkType = 1
	RemarkTypeMissed            RemarkType = 2
	RemarkTypeAnalysis          RemarkType = 3
	RemarkTypeAnalysisFPCommute RemarkType = 4
	RemarkTypeAnalysisAliasing  RemarkType = 5
	RemarkTypeFailure           RemarkType = 6
)

type SectionIteratorRef

type SectionIteratorRef = *OpaqueSectionIterator

@defgroup LLVMCObject Object file reading and writing @ingroup LLVMC

@{

type SymbolIteratorRef

type SymbolIteratorRef = *OpaqueSymbolIterator

type SymbolLookupCallback

type SymbolLookupCallback = func(_llcppg_param1 unsafe.Pointer, _llcppg_param2 c.Uint64T, _llcppg_param3 *c.Uint64T, _llcppg_param4 c.Uint64T, _llcppg_param5 **c.Char) *c.Char

The type for the symbol lookup function. This may be called by the disassembler for things like adding a comment for a PC plus a constant offset load instruction to use a symbol name instead of a load address value. It is passed the block information is saved when the disassembler context is created and the ReferenceValue to look up as a symbol. If no symbol is found for the ReferenceValue NULL is returned. The ReferenceType of the instruction is passed indirectly as is the PC of the instruction in ReferencePC. If the output reference can be determined its type is returned indirectly in ReferenceType along with ReferenceName if any, or that is set to NULL.

llgo:type C

type TailCallKind

type TailCallKind c.Int

Tail call kind for LLVMSetTailCallKind and LLVMGetTailCallKind.

Note that 'musttail' implies 'tail'.

@see CallInst::TailCallKind

const (
	TailCallKindNone     TailCallKind = 0
	TailCallKindTail     TailCallKind = 1
	TailCallKindMustTail TailCallKind = 2
	TailCallKindNoTail   TailCallKind = 3
)

type Target

type Target struct {
}

func (*Target) CreateTargetMachine

func (self *Target) CreateTargetMachine(Triple *c.Char, CPU *c.Char, Features *c.Char, Level CodeGenOptLevel, Reloc RelocMode, CodeModel CodeModel) TargetMachineRef

Creates a new llvm::TargetMachine. See llvm::Target::createTargetMachine

llgo:link (*Target).CreateTargetMachine C.LLVMCreateTargetMachine

func (*Target) CreateTargetMachineWithOptions

func (self *Target) CreateTargetMachineWithOptions(Triple *c.Char, Options TargetMachineOptionsRef) TargetMachineRef

Create a new llvm::TargetMachine.

\param T the target to create a machine for. \param Triple a triple describing the target machine. \param Options additional configuration (see

LLVMCreateTargetMachineOptions()).

llgo:link (*Target).CreateTargetMachineWithOptions C.LLVMCreateTargetMachineWithOptions

func (*Target) NextTarget

func (self *Target) NextTarget() TargetRef

Returns the next llvm::Target given a previous one (or null if there's none)

llgo:link (*Target).NextTarget C.LLVMGetNextTarget

func (*Target) TargetDescription

func (self *Target) TargetDescription() *c.Char

Returns the description of a target. See llvm::Target::getDescription

llgo:link (*Target).TargetDescription C.LLVMGetTargetDescription

func (*Target) TargetHasAsmBackend

func (self *Target) TargetHasAsmBackend() Bool

Returns if the target as an ASM backend (required for emitting output)

llgo:link (*Target).TargetHasAsmBackend C.LLVMTargetHasAsmBackend

func (*Target) TargetHasJIT

func (self *Target) TargetHasJIT() Bool

Returns if the target has a JIT

llgo:link (*Target).TargetHasJIT C.LLVMTargetHasJIT

func (*Target) TargetHasTargetMachine

func (self *Target) TargetHasTargetMachine() Bool

Returns if the target has a TargetMachine associated

llgo:link (*Target).TargetHasTargetMachine C.LLVMTargetHasTargetMachine

func (*Target) TargetName

func (self *Target) TargetName() *c.Char

Returns the name of a target. See llvm::Target::getName

llgo:link (*Target).TargetName C.LLVMGetTargetName

type TargetDataRef

type TargetDataRef = *OpaqueTargetData

func CreateTargetData

func CreateTargetData(StringRep *c.Char) TargetDataRef

Creates target data from a target layout string. See the constructor llvm::DataLayout::DataLayout.

type TargetLibraryInfoRef

type TargetLibraryInfoRef = *OpaqueTargetLibraryInfotData

type TargetMachineOptionsRef

type TargetMachineOptionsRef = *OpaqueTargetMachineOptions

@addtogroup LLVMCTarget

@{

func CreateTargetMachineOptions

func CreateTargetMachineOptions() TargetMachineOptionsRef

Create a new set of options for an llvm::TargetMachine.

The returned option structure must be released with LLVMDisposeTargetMachineOptions() after the call to LLVMCreateTargetMachineWithOptions().

type TargetMachineRef

type TargetMachineRef = *OpaqueTargetMachine

type TargetRef

type TargetRef = *Target

func GetFirstTarget

func GetFirstTarget() TargetRef

Returns the first llvm::Target in the registered targets list.

func GetTargetFromName

func GetTargetFromName(Name *c.Char) TargetRef

Finds the target corresponding to the given name and stores it in \p T. Returns 0 on success.

type ThinltoCodeGenT

type ThinltoCodeGenT = *OpaqueThinLTOCodeGenerator

opaque reference to a thin code generator

func ThinltoCreateCodegen

func ThinltoCreateCodegen() ThinltoCodeGenT

Instantiates a ThinLTO code generator. Returns NULL on error (check lto_get_error_message() for details).

The ThinLTOCodeGenerator is not intended to be reuse for multiple compilation: the model is that the client adds modules to the generator and ask to perform the ThinLTO optimizations / codegen, and finally destroys the codegenerator.

\since LTO_API_VERSION=18

type ThreadLocalMode

type ThreadLocalMode c.Int
const (
	NotThreadLocal         ThreadLocalMode = 0
	GeneralDynamicTLSModel ThreadLocalMode = 1
	LocalDynamicTLSModel   ThreadLocalMode = 2
	InitialExecTLSModel    ThreadLocalMode = 3
	LocalExecTLSModel      ThreadLocalMode = 4
)

type TypeKind

type TypeKind c.Int
const (
	// < type with no size
	VoidTypeKind TypeKind = 0
	// < 16 bit floating point type
	HalfTypeKind TypeKind = 1
	// < 32 bit floating point type
	FloatTypeKind TypeKind = 2
	// < 64 bit floating point type
	DoubleTypeKind TypeKind = 3
	// < 80 bit floating point type (X87)
	X86_FP80TypeKind TypeKind = 4
	// < 128 bit floating point type (112-bit mantissa)
	FP128TypeKind TypeKind = 5
	// < 128 bit floating point type (two 64-bits)
	PPC_FP128TypeKind TypeKind = 6
	// < Labels
	LabelTypeKind TypeKind = 7
	// < Arbitrary bit width integers
	IntegerTypeKind TypeKind = 8
	// < Functions
	FunctionTypeKind TypeKind = 9
	// < Structures
	StructTypeKind TypeKind = 10
	// < Arrays
	ArrayTypeKind TypeKind = 11
	// < Pointers
	PointerTypeKind TypeKind = 12
	// < Fixed width SIMD vector type
	VectorTypeKind TypeKind = 13
	// < Metadata
	MetadataTypeKind TypeKind = 14
	// < Tokens
	TokenTypeKind TypeKind = 16
	// < Scalable SIMD vector type
	ScalableVectorTypeKind TypeKind = 17
	// < 16 bit brain floating point type
	BFloatTypeKind TypeKind = 18
	// < X86 AMX
	X86_AMXTypeKind TypeKind = 19
	// < Target extension type
	TargetExtTypeKind TypeKind = 20
)

type TypeRef

type TypeRef = *OpaqueType

Each value in the LLVM IR has a type, an LLVMTypeRef.

@see llvm::Type

func BFloatType

func BFloatType() TypeRef

func DoubleType

func DoubleType() TypeRef

func FP128Type

func FP128Type() TypeRef

func FloatType

func FloatType() TypeRef

func HalfType

func HalfType() TypeRef

Obtain a floating point type from the global context.

These map to the functions in this group of the same name.

func Int1Type

func Int1Type() TypeRef

Obtain an integer type from the global context with a specified bit width.

func Int8Type

func Int8Type() TypeRef

func Int16Type

func Int16Type() TypeRef

func Int32Type

func Int32Type() TypeRef

func Int64Type

func Int64Type() TypeRef

func Int128Type

func Int128Type() TypeRef

func IntType

func IntType(NumBits c.Uint) TypeRef

func LabelType

func LabelType() TypeRef

func PPCFP128Type

func PPCFP128Type() TypeRef

func VoidType

func VoidType() TypeRef

These are similar to the above functions except they operate on the global context.

func X86AMXType

func X86AMXType() TypeRef

func X86FP80Type

func X86FP80Type() TypeRef

type UnnamedAddr

type UnnamedAddr c.Int
const (
	// < Address of the GV is significant.
	NoUnnamedAddr UnnamedAddr = 0
	// < Address of the GV is locally insignificant.
	LocalUnnamedAddr UnnamedAddr = 1
	// < Address of the GV is globally insignificant.
	GlobalUnnamedAddr UnnamedAddr = 2
)

type UseRef

type UseRef = *OpaqueUse

Used to get the users and usees of a Value.

@see llvm::Use

type ValueKind

type ValueKind c.Int
const (
	ArgumentValueKind              ValueKind = 0
	BasicBlockValueKind            ValueKind = 1
	MemoryUseValueKind             ValueKind = 2
	MemoryDefValueKind             ValueKind = 3
	MemoryPhiValueKind             ValueKind = 4
	FunctionValueKind              ValueKind = 5
	GlobalAliasValueKind           ValueKind = 6
	GlobalIFuncValueKind           ValueKind = 7
	GlobalVariableValueKind        ValueKind = 8
	BlockAddressValueKind          ValueKind = 9
	ConstantExprValueKind          ValueKind = 10
	ConstantArrayValueKind         ValueKind = 11
	ConstantStructValueKind        ValueKind = 12
	ConstantVectorValueKind        ValueKind = 13
	UndefValueValueKind            ValueKind = 14
	ConstantAggregateZeroValueKind ValueKind = 15
	ConstantDataArrayValueKind     ValueKind = 16
	ConstantDataVectorValueKind    ValueKind = 17
	ConstantIntValueKind           ValueKind = 18
	ConstantFPValueKind            ValueKind = 19
	ConstantPointerNullValueKind   ValueKind = 20
	ConstantTokenNoneValueKind     ValueKind = 21
	MetadataAsValueValueKind       ValueKind = 22
	InlineAsmValueKind             ValueKind = 23
	InstructionValueKind           ValueKind = 24
	PoisonValueValueKind           ValueKind = 25
	ConstantTargetNoneValueKind    ValueKind = 26
	ConstantPtrAuthValueKind       ValueKind = 27
)

type ValueMetadataEntry

type ValueMetadataEntry = OpaqueValueMetadataEntry

Represents an entry in a Global Object's metadata attachments.

This models std::pair<unsigned, MDNode *>

type ValueRef

type ValueRef = *OpaqueValue

Represents an individual value in LLVM IR.

This models llvm::Value.

func ConstAdd

func ConstAdd(LHSConstant ValueRef, RHSConstant ValueRef) ValueRef

func ConstExtractElement

func ConstExtractElement(VectorConstant ValueRef, IndexConstant ValueRef) ValueRef

func ConstNSWAdd

func ConstNSWAdd(LHSConstant ValueRef, RHSConstant ValueRef) ValueRef

func ConstNSWSub

func ConstNSWSub(LHSConstant ValueRef, RHSConstant ValueRef) ValueRef

func ConstNUWAdd

func ConstNUWAdd(LHSConstant ValueRef, RHSConstant ValueRef) ValueRef

func ConstNUWSub

func ConstNUWSub(LHSConstant ValueRef, RHSConstant ValueRef) ValueRef

func ConstString

func ConstString(Str *c.Char, Length c.Uint, DontNullTerminate Bool) ValueRef

Create a ConstantDataSequential with string content in the global context.

This is the same as LLVMConstStringInContext except it operates on the global context.

@see LLVMConstStringInContext() @see llvm::ConstantDataArray::getString()

func ConstSub

func ConstSub(LHSConstant ValueRef, RHSConstant ValueRef) ValueRef

func ConstXor

func ConstXor(LHSConstant ValueRef, RHSConstant ValueRef) ValueRef

func MDString deprecated

func MDString(Str *c.Char, SLen c.Uint) ValueRef

Deprecated: Use LLVMMDStringInContext2 instead.

type VerifierFailureAction

type VerifierFailureAction c.Int

@defgroup LLVMCAnalysis Analysis @ingroup LLVMC

@{

const (
	AbortProcessAction VerifierFailureAction = 0
	PrintMessageAction VerifierFailureAction = 1
	ReturnStatusAction VerifierFailureAction = 2
)

type Visibility

type Visibility c.Int
const (
	// < The GV is visible
	DefaultVisibility Visibility = 0
	// < The GV is hidden
	HiddenVisibility Visibility = 1
	// < The GV is protected
	ProtectedVisibility Visibility = 2
)

type YieldCallback

type YieldCallback = func(_llcppg_param1 ContextRef, _llcppg_param2 unsafe.Pointer)

llgo:type C

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL