mirror of
https://github.com/odin-lang/Odin.git
synced 2026-03-01 22:28:20 +00:00
factor out alloca generation into a helper
This commit is contained in:
@@ -413,9 +413,9 @@ lbValue lb_const_value(lbModule *m, Type *type, ExactValue value, bool allow_loc
|
||||
LLVMPositionBuilderAtEnd(p->builder, p->decl_block->block);
|
||||
|
||||
LLVMTypeRef llvm_type = lb_type(m, t);
|
||||
array_data = LLVMBuildAlloca(p->builder, llvm_type, "");
|
||||
LLVMSetAlignment(array_data, 16); // TODO(bill): Make this configurable
|
||||
LLVMPositionBuilderAtEnd(p->builder, p->curr_block->block);
|
||||
|
||||
array_data = llvm_alloca(p, llvm_type, 16);
|
||||
|
||||
LLVMBuildStore(p->builder, backing_array.value, array_data);
|
||||
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user