5 Constants
Functions for creating constant values in LLVM IR.
5.1 Integer Constants
procedure
(llvm-const-int type value [sign-extend]) → LLVMValueRef?
type : LLVMTypeRef? value : exact-nonnegative-integer? sign-extend : boolean? = #f
procedure
(llvm-const-int-of-string type text radix) → LLVMValueRef?
type : LLVMTypeRef? text : string? radix : exact-nonnegative-integer?
procedure
(llvm-const-int-get-s-ext-value const-val) → integer?
const-val : LLVMValueRef?
procedure
(llvm-const-int-get-z-ext-value const-val)
→ exact-nonnegative-integer? const-val : LLVMValueRef?
5.2 Floating-Point Constants
procedure
(llvm-const-real type value) → LLVMValueRef?
type : LLVMTypeRef? value : number?
procedure
(llvm-const-real-of-string type text) → LLVMValueRef?
type : LLVMTypeRef? text : string?
5.3 Composite Constants
procedure
(llvm-const-struct constant-vals [packed?]) → LLVMValueRef?
constant-vals : (listof LLVMValueRef?) packed? : boolean? = #f
procedure
(llvm-const-named-struct struct-ty constant-vals) → LLVMValueRef? struct-ty : LLVMTypeRef? constant-vals : (listof LLVMValueRef?)
procedure
(llvm-const-array element-ty constant-vals) → LLVMValueRef?
element-ty : LLVMTypeRef? constant-vals : (listof LLVMValueRef?)
procedure
(llvm-const-array2 element-ty constant-vals) → LLVMValueRef? element-ty : LLVMTypeRef? constant-vals : (listof LLVMValueRef?)
procedure
(llvm-const-vector scalar-constant-vals) → LLVMValueRef?
scalar-constant-vals : (listof LLVMValueRef?)
5.4 Special Constants
procedure
(llvm-const-null type) → LLVMValueRef?
type : LLVMTypeRef?
procedure
(llvm-const-all-ones type) → LLVMValueRef?
type : LLVMTypeRef?
procedure
(llvm-const-pointer-null type) → LLVMValueRef?
type : LLVMTypeRef?
procedure
(llvm-get-undef type) → LLVMValueRef?
type : LLVMTypeRef?
procedure
(llvm-get-poison type) → LLVMValueRef?
type : LLVMTypeRef?
5.5 Constant Expressions
procedure
(llvm-const-gep2 ty constant-val constant-indices) → LLVMValueRef? ty : LLVMTypeRef? constant-val : LLVMValueRef? constant-indices : (listof LLVMValueRef?)
procedure
(llvm-const-in-bounds-gep2 ty constant-val constant-indices) → LLVMValueRef? ty : LLVMTypeRef? constant-val : LLVMValueRef? constant-indices : (listof LLVMValueRef?)