LLVM API Documentation

Typedefs | Enumerations
Types and Enumerations
Core
Collaboration diagram for Types and Enumerations:

Typedefs

typedef struct LLVMOpaqueContext * LLVMContextRef
typedef struct LLVMOpaqueModule * LLVMModuleRef
typedef struct LLVMOpaqueType * LLVMTypeRef
typedef struct LLVMOpaqueValue * LLVMValueRef
typedef struct
LLVMOpaqueBasicBlock * 
LLVMBasicBlockRef
typedef struct LLVMOpaqueBuilder * LLVMBuilderRef
typedef struct
LLVMOpaqueModuleProvider * 
LLVMModuleProviderRef
typedef struct
LLVMOpaquePassManager * 
LLVMPassManagerRef
typedef struct
LLVMOpaquePassRegistry * 
LLVMPassRegistryRef
typedef struct LLVMOpaqueUse * LLVMUseRef
typedef struct
LLVMOpaqueDiagnosticInfo * 
LLVMDiagnosticInfoRef

Enumerations

enum  LLVMAttribute {
  LLVMZExtAttribute = 1<<0, LLVMSExtAttribute = 1<<1, LLVMNoReturnAttribute = 1<<2, LLVMInRegAttribute = 1<<3,
  LLVMStructRetAttribute = 1<<4, LLVMNoUnwindAttribute = 1<<5, LLVMNoAliasAttribute = 1<<6, LLVMByValAttribute = 1<<7,
  LLVMNestAttribute = 1<<8, LLVMReadNoneAttribute = 1<<9, LLVMReadOnlyAttribute = 1<<10, LLVMNoInlineAttribute = 1<<11,
  LLVMAlwaysInlineAttribute = 1<<12, LLVMOptimizeForSizeAttribute = 1<<13, LLVMStackProtectAttribute = 1<<14, LLVMStackProtectReqAttribute = 1<<15,
  LLVMAlignment = 31<<16, LLVMNoCaptureAttribute = 1<<21, LLVMNoRedZoneAttribute = 1<<22, LLVMNoImplicitFloatAttribute = 1<<23,
  LLVMNakedAttribute = 1<<24, LLVMInlineHintAttribute = 1<<25, LLVMStackAlignment = 7<<26, LLVMReturnsTwice = 1 << 29,
  LLVMUWTable = 1 << 30, LLVMNonLazyBind = 1 << 31
}
enum  LLVMOpcode {
  LLVMRet = 1, LLVMBr = 2, LLVMSwitch = 3, LLVMIndirectBr = 4,
  LLVMInvoke = 5, LLVMUnreachable = 7, LLVMAdd = 8, LLVMFAdd = 9,
  LLVMSub = 10, LLVMFSub = 11, LLVMMul = 12, LLVMFMul = 13,
  LLVMUDiv = 14, LLVMSDiv = 15, LLVMFDiv = 16, LLVMURem = 17,
  LLVMSRem = 18, LLVMFRem = 19, LLVMShl = 20, LLVMLShr = 21,
  LLVMAShr = 22, LLVMAnd = 23, LLVMOr = 24, LLVMXor = 25,
  LLVMAlloca = 26, LLVMLoad = 27, LLVMStore = 28, LLVMGetElementPtr = 29,
  LLVMTrunc = 30, LLVMZExt = 31, LLVMSExt = 32, LLVMFPToUI = 33,
  LLVMFPToSI = 34, LLVMUIToFP = 35, LLVMSIToFP = 36, LLVMFPTrunc = 37,
  LLVMFPExt = 38, LLVMPtrToInt = 39, LLVMIntToPtr = 40, LLVMBitCast = 41,
  LLVMAddrSpaceCast = 60, LLVMICmp = 42, LLVMFCmp = 43, LLVMPHI = 44,
  LLVMCall = 45, LLVMSelect = 46, LLVMUserOp1 = 47, LLVMUserOp2 = 48,
  LLVMVAArg = 49, LLVMExtractElement = 50, LLVMInsertElement = 51, LLVMShuffleVector = 52,
  LLVMExtractValue = 53, LLVMInsertValue = 54, LLVMFence = 55, LLVMAtomicCmpXchg = 56,
  LLVMAtomicRMW = 57, LLVMResume = 58, LLVMLandingPad = 59
}
enum  LLVMTypeKind {
  LLVMVoidTypeKind, LLVMHalfTypeKind, LLVMFloatTypeKind, LLVMDoubleTypeKind,
  LLVMX86_FP80TypeKind, LLVMFP128TypeKind, LLVMPPC_FP128TypeKind, LLVMLabelTypeKind,
  LLVMIntegerTypeKind, LLVMFunctionTypeKind, LLVMStructTypeKind, LLVMArrayTypeKind,
  LLVMPointerTypeKind, LLVMVectorTypeKind, LLVMMetadataTypeKind, LLVMX86_MMXTypeKind
}
enum  LLVMLinkage {
  LLVMExternalLinkage, LLVMAvailableExternallyLinkage, LLVMLinkOnceAnyLinkage, LLVMLinkOnceODRLinkage,
  LLVMLinkOnceODRAutoHideLinkage, LLVMWeakAnyLinkage, LLVMWeakODRLinkage, LLVMAppendingLinkage,
  LLVMInternalLinkage, LLVMPrivateLinkage, LLVMDLLImportLinkage, LLVMDLLExportLinkage,
  LLVMExternalWeakLinkage, LLVMGhostLinkage, LLVMCommonLinkage, LLVMLinkerPrivateLinkage,
  LLVMLinkerPrivateWeakLinkage
}
enum  LLVMVisibility { LLVMDefaultVisibility, LLVMHiddenVisibility, LLVMProtectedVisibility }
enum  LLVMDLLStorageClass { LLVMDefaultStorageClass = 0, LLVMDLLImportStorageClass = 1, LLVMDLLExportStorageClass = 2 }
enum  LLVMCallConv {
  LLVMCCallConv = 0, LLVMFastCallConv = 8, LLVMColdCallConv = 9, LLVMWebKitJSCallConv = 12,
  LLVMAnyRegCallConv = 13, LLVMX86StdcallCallConv = 64, LLVMX86FastcallCallConv = 65
}
enum  LLVMIntPredicate {
  LLVMIntEQ = 32, LLVMIntNE, LLVMIntUGT, LLVMIntUGE,
  LLVMIntULT, LLVMIntULE, LLVMIntSGT, LLVMIntSGE,
  LLVMIntSLT, LLVMIntSLE
}
enum  LLVMRealPredicate {
  LLVMRealPredicateFalse, LLVMRealOEQ, LLVMRealOGT, LLVMRealOGE,
  LLVMRealOLT, LLVMRealOLE, LLVMRealONE, LLVMRealORD,
  LLVMRealUNO, LLVMRealUEQ, LLVMRealUGT, LLVMRealUGE,
  LLVMRealULT, LLVMRealULE, LLVMRealUNE, LLVMRealPredicateTrue
}
enum  LLVMLandingPadClauseTy { LLVMLandingPadCatch, LLVMLandingPadFilter }
enum  LLVMThreadLocalMode {
  LLVMNotThreadLocal = 0, LLVMGeneralDynamicTLSModel, LLVMLocalDynamicTLSModel, LLVMInitialExecTLSModel,
  LLVMLocalExecTLSModel
}
enum  LLVMAtomicOrdering {
  LLVMAtomicOrderingNotAtomic = 0, LLVMAtomicOrderingUnordered = 1, LLVMAtomicOrderingMonotonic = 2, LLVMAtomicOrderingAcquire = 4,
  LLVMAtomicOrderingRelease = 5, LLVMAtomicOrderingAcquireRelease = 6, LLVMAtomicOrderingSequentiallyConsistent = 7
}
enum  LLVMAtomicRMWBinOp {
  LLVMAtomicRMWBinOpXchg, LLVMAtomicRMWBinOpAdd, LLVMAtomicRMWBinOpSub, LLVMAtomicRMWBinOpAnd,
  LLVMAtomicRMWBinOpNand, LLVMAtomicRMWBinOpOr, LLVMAtomicRMWBinOpXor, LLVMAtomicRMWBinOpMax,
  LLVMAtomicRMWBinOpMin, LLVMAtomicRMWBinOpUMax, LLVMAtomicRMWBinOpUMin
}
enum  LLVMDiagnosticSeverity { LLVMDSError, LLVMDSWarning, LLVMDSRemark, LLVMDSNote }

Typedef Documentation

typedef struct LLVMOpaqueBasicBlock* LLVMBasicBlockRef

Represents a basic block of instructions in LLVM IR.

This models llvm::BasicBlock.

Definition at line 99 of file Core.h.

typedef struct LLVMOpaqueBuilder* LLVMBuilderRef

Represents an LLVM basic block builder.

This models llvm::IRBuilder.

Definition at line 106 of file Core.h.

typedef struct LLVMOpaqueContext* LLVMContextRef

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

Definition at line 70 of file Core.h.

typedef struct LLVMOpaqueDiagnosticInfo* LLVMDiagnosticInfoRef
See also:
llvm::DiagnosticInfo

Definition at line 131 of file Core.h.

typedef struct LLVMOpaqueModuleProvider* LLVMModuleProviderRef

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.

Definition at line 113 of file Core.h.

typedef struct LLVMOpaqueModule* LLVMModuleRef

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

See also:
llvm::Module

Definition at line 78 of file Core.h.

typedef struct LLVMOpaquePassManager* LLVMPassManagerRef
See also:
llvm::PassManagerBase

Definition at line 116 of file Core.h.

typedef struct LLVMOpaquePassRegistry* LLVMPassRegistryRef
See also:
llvm::PassRegistry

Definition at line 119 of file Core.h.

typedef struct LLVMOpaqueType* LLVMTypeRef

Each value in the LLVM IR has a type, an LLVMTypeRef.

See also:
llvm::Type

Definition at line 85 of file Core.h.

typedef struct LLVMOpaqueUse* LLVMUseRef

Used to get the users and usees of a Value.

See also:
llvm::Use

Definition at line 125 of file Core.h.

typedef struct LLVMOpaqueValue* LLVMValueRef

Represents an individual value in LLVM IR.

This models llvm::Value.

Definition at line 92 of file Core.h.


Enumeration Type Documentation

Enumerator:
LLVMAtomicOrderingNotAtomic 

A load or store which is not atomic

LLVMAtomicOrderingUnordered 

Lowest level of atomicity, guarantees somewhat sane results, lock free.

LLVMAtomicOrderingMonotonic 

guarantees that if you take all the operations affecting a specific address, a consistent ordering exists

LLVMAtomicOrderingAcquire 

Acquire provides a barrier of the sort necessary to acquire a lock to access other memory with normal loads and stores.

LLVMAtomicOrderingRelease 

Release is similar to Acquire, but with a barrier of the sort necessary to release a lock.

LLVMAtomicOrderingAcquireRelease 

provides both an Acquire and a Release barrier (for fences and operations which both read and write memory).

LLVMAtomicOrderingSequentiallyConsistent 

provides Acquire semantics for loads and Release semantics for stores. Additionally, it guarantees that a total ordering exists between all SequentiallyConsistent operations.

Definition at line 363 of file Core.h.

Enumerator:
LLVMAtomicRMWBinOpXchg 

Set the new value and return the one old

LLVMAtomicRMWBinOpAdd 

Add a value and return the old one

LLVMAtomicRMWBinOpSub 

Subtract a value and return the old one

LLVMAtomicRMWBinOpAnd 

And a value and return the old one

LLVMAtomicRMWBinOpNand 

Not-And a value and return the old one

LLVMAtomicRMWBinOpOr 

OR a value and return the old one

LLVMAtomicRMWBinOpXor 

Xor a value and return the old one

LLVMAtomicRMWBinOpMax 

Sets the value if it's greater than the original using a signed comparison and return the old one

LLVMAtomicRMWBinOpMin 

Sets the value if it's Smaller than the original using a signed comparison and return the old one

LLVMAtomicRMWBinOpUMax 

Sets the value if it's greater than the original using an unsigned comparison and return the old one

LLVMAtomicRMWBinOpUMin 

Sets the value if it's greater than the original using an unsigned comparison and return the old one

Definition at line 390 of file Core.h.

Enumerator:
LLVMZExtAttribute 
LLVMSExtAttribute 
LLVMNoReturnAttribute 
LLVMInRegAttribute 
LLVMStructRetAttribute 
LLVMNoUnwindAttribute 
LLVMNoAliasAttribute 
LLVMByValAttribute 
LLVMNestAttribute 
LLVMReadNoneAttribute 
LLVMReadOnlyAttribute 
LLVMNoInlineAttribute 
LLVMAlwaysInlineAttribute 
LLVMOptimizeForSizeAttribute 
LLVMStackProtectAttribute 
LLVMStackProtectReqAttribute 
LLVMAlignment 
LLVMNoCaptureAttribute 
LLVMNoRedZoneAttribute 
LLVMNoImplicitFloatAttribute 
LLVMNakedAttribute 
LLVMInlineHintAttribute 
LLVMStackAlignment 
LLVMReturnsTwice 
LLVMUWTable 
LLVMNonLazyBind 

Definition at line 133 of file Core.h.

Enumerator:
LLVMCCallConv 
LLVMFastCallConv 
LLVMColdCallConv 
LLVMWebKitJSCallConv 
LLVMAnyRegCallConv 
LLVMX86StdcallCallConv 
LLVMX86FastcallCallConv 

Definition at line 308 of file Core.h.

Enumerator:
LLVMDSError 
LLVMDSWarning 
LLVMDSRemark 
LLVMDSNote 

Definition at line 412 of file Core.h.

Enumerator:
LLVMDefaultStorageClass 
LLVMDLLImportStorageClass 

Function to be imported from DLL.

LLVMDLLExportStorageClass 

Function to be accessible from DLL.

Definition at line 302 of file Core.h.

Enumerator:
LLVMIntEQ 

equal

LLVMIntNE 

not equal

LLVMIntUGT 

unsigned greater than

LLVMIntUGE 

unsigned greater or equal

LLVMIntULT 

unsigned less than

LLVMIntULE 

unsigned less or equal

LLVMIntSGT 

signed greater than

LLVMIntSGE 

signed greater or equal

LLVMIntSLT 

signed less than

LLVMIntSLE 

signed less or equal

Definition at line 318 of file Core.h.

Enumerator:
LLVMLandingPadCatch 

A catch clause

LLVMLandingPadFilter 

A filter clause

Definition at line 350 of file Core.h.

Enumerator:
LLVMExternalLinkage 

Externally visible function

LLVMAvailableExternallyLinkage 
LLVMLinkOnceAnyLinkage 

Keep one copy of function when linking (inline)

LLVMLinkOnceODRLinkage 

Same, but only replaced by something equivalent.

LLVMLinkOnceODRAutoHideLinkage 

Obsolete

LLVMWeakAnyLinkage 

Keep one copy of function when linking (weak)

LLVMWeakODRLinkage 

Same, but only replaced by something equivalent.

LLVMAppendingLinkage 

Special purpose, only applies to global arrays

LLVMInternalLinkage 

Rename collisions when linking (static functions)

LLVMPrivateLinkage 

Like Internal, but omit from symbol table

LLVMDLLImportLinkage 

Obsolete

LLVMDLLExportLinkage 

Obsolete

LLVMExternalWeakLinkage 

ExternalWeak linkage description

LLVMGhostLinkage 

Obsolete

LLVMCommonLinkage 

Tentative definitions

LLVMLinkerPrivateLinkage 

Like Private, but linker removes.

LLVMLinkerPrivateWeakLinkage 

Like LinkerPrivate, but is weak.

Definition at line 273 of file Core.h.

enum LLVMOpcode
Enumerator:
LLVMRet 
LLVMBr 
LLVMSwitch 
LLVMIndirectBr 
LLVMInvoke 
LLVMUnreachable 
LLVMAdd 
LLVMFAdd 
LLVMSub 
LLVMFSub 
LLVMMul 
LLVMFMul 
LLVMUDiv 
LLVMSDiv 
LLVMFDiv 
LLVMURem 
LLVMSRem 
LLVMFRem 
LLVMShl 
LLVMLShr 
LLVMAShr 
LLVMAnd 
LLVMOr 
LLVMXor 
LLVMAlloca 
LLVMLoad 
LLVMStore 
LLVMGetElementPtr 
LLVMTrunc 
LLVMZExt 
LLVMSExt 
LLVMFPToUI 
LLVMFPToSI 
LLVMUIToFP 
LLVMSIToFP 
LLVMFPTrunc 
LLVMFPExt 
LLVMPtrToInt 
LLVMIntToPtr 
LLVMBitCast 
LLVMAddrSpaceCast 
LLVMICmp 
LLVMFCmp 
LLVMPHI 
LLVMCall 
LLVMSelect 
LLVMUserOp1 
LLVMUserOp2 
LLVMVAArg 
LLVMExtractElement 
LLVMInsertElement 
LLVMShuffleVector 
LLVMExtractValue 
LLVMInsertValue 
LLVMFence 
LLVMAtomicCmpXchg 
LLVMAtomicRMW 
LLVMResume 
LLVMLandingPad 

Definition at line 175 of file Core.h.

Enumerator:
LLVMRealPredicateFalse 

Always false (always folded)

LLVMRealOEQ 

True if ordered and equal

LLVMRealOGT 

True if ordered and greater than

LLVMRealOGE 

True if ordered and greater than or equal

LLVMRealOLT 

True if ordered and less than

LLVMRealOLE 

True if ordered and less than or equal

LLVMRealONE 

True if ordered and operands are unequal

LLVMRealORD 

True if ordered (no nans)

LLVMRealUNO 

True if unordered: isnan(X) | isnan(Y)

LLVMRealUEQ 

True if unordered or equal

LLVMRealUGT 

True if unordered or greater than

LLVMRealUGE 

True if unordered, greater than, or equal

LLVMRealULT 

True if unordered or less than

LLVMRealULE 

True if unordered, less than, or equal

LLVMRealUNE 

True if unordered or not equal

LLVMRealPredicateTrue 

Always true (always folded)

Definition at line 331 of file Core.h.

Enumerator:
LLVMNotThreadLocal 
LLVMGeneralDynamicTLSModel 
LLVMLocalDynamicTLSModel 
LLVMInitialExecTLSModel 
LLVMLocalExecTLSModel 

Definition at line 355 of file Core.h.

Enumerator:
LLVMVoidTypeKind 

type with no size

LLVMHalfTypeKind 

16 bit floating point type

LLVMFloatTypeKind 

32 bit floating point type

LLVMDoubleTypeKind 

64 bit floating point type

LLVMX86_FP80TypeKind 

80 bit floating point type (X87)

LLVMFP128TypeKind 

128 bit floating point type (112-bit mantissa)

LLVMPPC_FP128TypeKind 

128 bit floating point type (two 64-bits)

LLVMLabelTypeKind 

Labels

LLVMIntegerTypeKind 

Arbitrary bit width integers

LLVMFunctionTypeKind 

Functions

LLVMStructTypeKind 

Structures

LLVMArrayTypeKind 

Arrays

LLVMPointerTypeKind 

Pointers

LLVMVectorTypeKind 

SIMD 'packed' format, or other vector type

LLVMMetadataTypeKind 

Metadata

LLVMX86_MMXTypeKind 

X86 MMX

Definition at line 254 of file Core.h.

Enumerator:
LLVMDefaultVisibility 

The GV is visible

LLVMHiddenVisibility 

The GV is hidden

LLVMProtectedVisibility 

The GV is protected

Definition at line 296 of file Core.h.