addIrLine static method

dynamic addIrLine(
  1. String line
)

Adds a line to the LLVM IR with current indentation.

Appends an LLVM IR instruction or directive with proper indentation based on the current irIndent level. This ensures readable formatting of the generated IR code.

Parameters:

  • line: The LLVM IR instruction or directive to add

Implementation

static addIrLine(String line) {
  ir += "${"  " * irIndent}${line.trim()}\n";
}