Fixed accidental uses of global context.

This commit is contained in:
Christoffer Lerno
2020-04-17 09:34:29 +02:00
committed by Christoffer Lerno
parent 6117a1be7c
commit 2c573c8a15
3 changed files with 5 additions and 5 deletions

View File

@@ -109,7 +109,7 @@ void gencontext_emit_function_body(GenContext *context, Decl *decl)
context->current_block = entry;
context->current_block_is_target = true;
context->expr_block_exit = NULL;
context->builder = LLVMCreateBuilder();
context->builder = LLVMCreateBuilderInContext(context->context);
LLVMPositionBuilderAtEnd(context->builder, entry);
LLVMValueRef alloca_point = LLVMBuildAlloca(context->builder, LLVMInt32TypeInContext(context->context), "alloca_point");