Remove dynamic_alloca from BuilderMethods
This commit is contained in:
parent
62cf644c64
commit
0fe84bc38b
3 changed files with 1 additions and 10 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue