9.1.0.3
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
Creates a constant integer of the given type with value. If sign-extend is true, the value is sign-extended to the type’s width.
procedure
(llvm-const-int-of-string type text radix) → LLVMValueRef?
type : LLVMTypeRef? text : string? radix : exact-nonnegative-integer?
Creates a constant integer by parsing text in the given radix (e.g., 10 for decimal, 16 for hex).
procedure
(llvm-const-int-get-s-ext-value const-val) → integer?
const-val : LLVMValueRef?
Returns the sign-extended value of a constant integer.
procedure
(llvm-const-int-get-z-ext-value const-val)
→ exact-nonnegative-integer? const-val : LLVMValueRef?
Returns the zero-extended value of a constant integer.
5.2 Floating-Point Constants
procedure
(llvm-const-real type value) → LLVMValueRef?
type : LLVMTypeRef? value : number?
Creates a constant floating-point value of the given type.
procedure
(llvm-const-real-of-string type text) → LLVMValueRef?
type : LLVMTypeRef? text : string?
Creates a constant floating-point value by parsing text.
5.3 Special Constants
procedure
(llvm-const-null type) → LLVMValueRef?
type : LLVMTypeRef?
Creates a null constant of the given type.
procedure
(llvm-const-all-ones type) → LLVMValueRef?
type : LLVMTypeRef?
Creates a constant with all bits set for the given type.
procedure
(llvm-const-pointer-null type) → LLVMValueRef?
type : LLVMTypeRef?
Creates a null pointer constant of the given pointer type.
procedure
(llvm-get-undef type) → LLVMValueRef?
type : LLVMTypeRef?
Creates an undefined value of the given type.
procedure
(llvm-get-poison type) → LLVMValueRef?
type : LLVMTypeRef?
Creates a poison value of the given type.