github.com/llir/llvm@v0.3.6/ir/func_block.go (about) 1 package ir 2 3 // NewBlock appends a new basic block to the function based on the given label 4 // name. An empty label name indicates an unnamed basic block. 5 // 6 // The Parent field of the block is set to f. 7 func (f *Func) NewBlock(name string) *Block { 8 block := NewBlock(name) 9 block.Parent = f 10 f.Blocks = append(f.Blocks, block) 11 return block 12 }