On this page:
8.1 Value Accessors
llvm-get-aggregate-element
llvm-get-alignment
llvm-get-allocated-type
llvm-get-arg-operand
8.2 Basic Block Accessors
llvm-get-basic-block-name
llvm-get-basic-block-parent
llvm-get-basic-block-terminator
8.3 Instruction Accessors
llvm-get-atomic-sync-scope-id
llvm-get-attribute-count-at-index
llvm-get-block-address-basic-block
8.4 Constant Accessors
llvm-get-as-string
8.5 Module and Function Accessors
llvm-get-first-basic-block
llvm-get-last-basic-block
llvm-get-next-basic-block
llvm-get-previous-basic-block
llvm-get-first-instruction
llvm-get-last-instruction
8.6 Instruction Navigation
llvm-get-next-instruction
llvm-get-previous-instruction
8.7 Operand Access
llvm-get-num-operands
llvm-get-operand
8.8 Value and Type Classification
llvm-get-value-kind
llvm-get-function-call-conv
8.9 Diagnostic Information
llvm-get-diag-info-severity
9.1

8 Accessors (Getter Functions)🔗ℹ

Functions to query and retrieve information from LLVM IR objects.

8.1 Value Accessors🔗ℹ

procedure

(llvm-get-aggregate-element agg-val index)  LLVMValueRef?

  agg-val : LLVMValueRef?
  index : exact-nonnegative-integer?
Returns the element at index from an aggregate value.

Returns the alignment of a value in bytes.

procedure

(llvm-get-allocated-type val)  LLVMTypeRef?

  val : LLVMValueRef?
Returns the allocated type of an allocation instruction (e.g., from malloc or alloca).

procedure

(llvm-get-arg-operand val index)  LLVMValueRef?

  val : LLVMValueRef?
  index : exact-nonnegative-integer?
Returns the operand at index for a function call or invoke instruction.

8.2 Basic Block Accessors🔗ℹ

Returns the name of a basic block.

Returns the function that contains the given basic block.

Returns the terminator instruction of a basic block, or #f if none exists.

8.3 Instruction Accessors🔗ℹ

Returns the synchronization scope ID of an atomic instruction.

Returns the number of attributes at the given index on a function.

Returns the basic block for a block address value.

8.4 Constant Accessors🔗ℹ

procedure

(llvm-get-as-string c out-param)  string?

  c : LLVMValueRef?
  out-param : (box/c any?)
Returns the string value of a string constant.

8.5 Module and Function Accessors🔗ℹ

Returns the first basic block of a function.

Returns the last basic block of a function.

Returns the next basic block in a function, or #f if this is the last block.

Returns the previous basic block in a function, or #f if this is the first block.

Returns the first instruction in a basic block.

Returns the last instruction in a basic block.

8.6 Instruction Navigation🔗ℹ

procedure

(llvm-get-next-instruction inst)  LLVMValueRef?

  inst : LLVMValueRef?
Returns the next instruction after the given instruction, or #f if none exists.

procedure

(llvm-get-previous-instruction inst)  LLVMValueRef?

  inst : LLVMValueRef?
Returns the previous instruction before the given instruction, or #f if none exists.

8.7 Operand Access🔗ℹ

Returns the number of operands in a value.

procedure

(llvm-get-operand val index)  LLVMValueRef?

  val : LLVMValueRef?
  index : exact-nonnegative-integer?
Returns the operand at index in a value.

8.8 Value and Type Classification🔗ℹ

procedure

(llvm-get-value-kind val)  _llvm-value-kind

  val : LLVMValueRef?
Returns the kind (classification) of a value.

Returns the calling convention of a function.

8.9 Diagnostic Information🔗ℹ

procedure

(llvm-get-diag-info-severity diag-info)

  _llvm-diagnostic-severity
  diag-info : LLVMDiagnosticInfoRef?
Returns the severity level of a diagnostic message.