Struct Block

Struct Documentation

struct Block

Represents a block in a program (e.g. the body of a loop). Essentially a wrapper around a vector of statements.

Public Functions

Block(Stmt *parent = nullptr)

Constructs a block with specified parent.

void add(Stmt *stmt)

Adds the given statement to this block.

void resolveTypes()

Resolves types on all contained statements.

void codegen(llvm::BasicBlock *&block)

Sequentially generates code for each statement in this block.

Block *clone(Generic *ref)

Sequentially clones each statement in this block.

Public Members

Stmt *parent

Statement containing this block.

std::vector<Stmt *> stmts

Vector of statements contained by this block.