addIrlLabel static method

dynamic addIrlLabel(
  1. String label
)

Adds a labeled block to the LLVM IR and increases indentation.

Used for creating labeled blocks in LLVM IR (functions, basic blocks, etc.). Automatically increases the indentation level for subsequent instructions.

Parameters:

  • label: The label name (e.g., "entry", "then.0", "loop.1")

Example:

Node.addIrlLabel("entry");  // Creates: "entry:"
Node.addIrLine("ret i64 0"); // Indented under the label

Implementation

static addIrlLabel(String label) {
  ir += "${"  " * irIndent}${label.trim()}:\n";
  irIndent++;
}