emit a store for the stack fn arguments

This commit is contained in:
Luna 2019-09-28 13:40:11 -03:00
parent 21dcb3e65d
commit 65a9e58a9a
2 changed files with 5 additions and 2 deletions

BIN
hello

Binary file not shown.

View file

@ -449,8 +449,11 @@ pub const Codegen = struct {
std.debug.warn("SET PARAM LLVM ALLOCA {} to {}\n", param_node.name.lexeme, alloca);
param.llvm_alloca = alloca;
// TODO store register into stack param
// llvm.LLVMBuildStore(builder, null, assign_expr);
_ = llvm.LLVMBuildStore(
builder,
llvm.LLVMGetParam(func, @intCast(c_uint, idx)),
alloca,
);
}
self.ctx.setScope(fn_sym.scope);