about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/builder.rs
diff options
context:
space:
mode:
authorbjorn3 <17426603+bjorn3@users.noreply.github.com>2022-10-01 17:34:21 +0000
committerbjorn3 <17426603+bjorn3@users.noreply.github.com>2022-10-02 13:42:02 +0000
commit0fe84bc38b19bacb7cb2a5765fb4ffa2106fe9e2 (patch)
tree1e0900c46cc18c92f59ae4e7d91457113c6ce7da /compiler/rustc_codegen_llvm/src/builder.rs
parent62cf644c64b6e9e2f18c6d846a25a5c98c252430 (diff)
downloadrust-0fe84bc38b19bacb7cb2a5765fb4ffa2106fe9e2.tar.gz
rust-0fe84bc38b19bacb7cb2a5765fb4ffa2106fe9e2.zip
Remove dynamic_alloca from BuilderMethods
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/builder.rs')
-rw-r--r--compiler/rustc_codegen_llvm/src/builder.rs6
1 files changed, 1 insertions, 5 deletions
diff --git a/compiler/rustc_codegen_llvm/src/builder.rs b/compiler/rustc_codegen_llvm/src/builder.rs
index 7c9dbb10847..ae56fe99f06 100644
--- a/compiler/rustc_codegen_llvm/src/builder.rs
+++ b/compiler/rustc_codegen_llvm/src/builder.rs
@@ -411,12 +411,8 @@ impl<'a, 'll, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
     fn alloca(&mut self, ty: &'ll Type, align: Align) -> &'ll Value {
         let mut bx = Builder::with_cx(self.cx);
         bx.position_at_start(unsafe { llvm::LLVMGetFirstBasicBlock(self.llfn()) });
-        bx.dynamic_alloca(ty, align)
-    }
-
-    fn dynamic_alloca(&mut self, ty: &'ll Type, align: Align) -> &'ll Value {
         unsafe {
-            let alloca = llvm::LLVMBuildAlloca(self.llbuilder, ty, UNNAMED);
+            let alloca = llvm::LLVMBuildAlloca(bx.llbuilder, ty, UNNAMED);
             llvm::LLVMSetAlignment(alloca, align.bytes() as c_uint);
             alloca
         }