mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-18 11:52:22 -07:00
Make sure builder uses the InContext version
This commit is contained in:
@@ -3117,7 +3117,7 @@ void lb_begin_procedure_body(lbProcedure *p) {
|
||||
}
|
||||
}
|
||||
|
||||
p->builder = LLVMCreateBuilder();
|
||||
p->builder = LLVMCreateBuilderInContext(p->module->ctx);
|
||||
|
||||
p->decl_block = lb_create_block(p, "decls", true);
|
||||
p->entry_block = lb_create_block(p, "entry", true);
|
||||
@@ -12898,7 +12898,11 @@ lbAddr lb_build_addr(lbProcedure *p, Ast *expr) {
|
||||
void lb_init_module(lbModule *m, Checker *c) {
|
||||
m->info = &c->info;
|
||||
|
||||
#if 1
|
||||
m->ctx = LLVMGetGlobalContext();
|
||||
#else
|
||||
m->ctx = LLVMContextCreate();
|
||||
#endif
|
||||
m->mod = LLVMModuleCreateWithNameInContext("odin_module", m->ctx);
|
||||
// m->debug_builder = nullptr;
|
||||
if (build_context.ODIN_DEBUG) {
|
||||
|
||||
Reference in New Issue
Block a user