Introduce Bx::switch_to_block

This commit is contained in:
bjorn3 2022-02-18 15:37:31 +01:00
parent 0edcf1e249
commit 96cf7999ab
6 changed files with 95 additions and 94 deletions

View file

@ -166,6 +166,10 @@ impl<'a, 'll, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
Self::append_block(self.cx, self.llfn(), name)
}
fn switch_to_block(&mut self, llbb: Self::BasicBlock) {
*self = Self::build(self.cx, llbb)
}
fn ret_void(&mut self) {
unsafe {
llvm::LLVMBuildRetVoid(self.llbuilder);