(instructions: Vec<IrInstruction>, term: IrTerminator)
| 156 | } |
| 157 | |
| 158 | fn function(instructions: Vec<IrInstruction>, term: IrTerminator) -> IrFunction { |
| 159 | let mut func = IrFunction::new("f", i32_ty()); |
| 160 | let mut block = IrBlock::new("entry"); |
| 161 | for inst in instructions { |
| 162 | block.push_instruction(inst); |
| 163 | } |
| 164 | block.set_terminator(term); |
| 165 | func.push_block(block); |
| 166 | func |
| 167 | } |
| 168 | |
| 169 | #[test] |
| 170 | fn removes_unused_pure_chain() { |