diff options
| author | bjorn3 <bjorn3@users.noreply.github.com> | 2022-02-18 15:37:31 +0100 |
|---|---|---|
| committer | bjorn3 <bjorn3@users.noreply.github.com> | 2022-02-24 12:18:21 +0100 |
| commit | 96cf7999ab64ead0c06384da51eb8586ffebfc1e (patch) | |
| tree | cdfaed89f7ad40550e40560013125b9026d8a8b8 /compiler/rustc_codegen_llvm/src/builder.rs | |
| parent | 0edcf1e2496caed074187c3c5ffac14537e633cf (diff) | |
| download | rust-96cf7999ab64ead0c06384da51eb8586ffebfc1e.tar.gz rust-96cf7999ab64ead0c06384da51eb8586ffebfc1e.zip | |
Introduce Bx::switch_to_block
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/builder.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/builder.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_llvm/src/builder.rs b/compiler/rustc_codegen_llvm/src/builder.rs index 478cc3c06f6..780af5bc2af 100644 --- a/compiler/rustc_codegen_llvm/src/builder.rs +++ b/compiler/rustc_codegen_llvm/src/builder.rs @@ -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); |
