cranelift-frontend: Add the FunctionBuilder::insert_block_after method

This commit is contained in:
Nick Fitzgerald
2020-06-30 12:00:30 -07:00
parent 98e899f6b3
commit a2f4202800
2 changed files with 14 additions and 36 deletions

View File

@@ -228,6 +228,11 @@ impl<'a> FunctionBuilder<'a> {
block
}
/// Insert `block` in the layout *after* the existing block `after`.
pub fn insert_block_after(&mut self, block: Block, after: Block) {
self.func.layout.insert_block_after(block, after);
}
/// After the call to this function, new instructions will be inserted into the designated
/// block, in the order they are declared. You must declare the types of the Block arguments
/// you will use here.