Skip to content

Commit

Permalink
Experiments
Browse files Browse the repository at this point in the history
  • Loading branch information
lerno committed Nov 13, 2023
1 parent cc1cff8 commit 686ba5f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/compiler/llvm_codegen_function.c
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ void llvm_emit_body(GenContext *c, LLVMValueRef function, FunctionPrototype *pro
llvm_emit_stacktrace_definitions(c);
c->builder = prev_builder;
}
else if (c->debug.enable_stacktrace)
else if (c->debug.enable_stacktrace && !c->debug.stack_init_fn)
{
const char *name = ".stacktrace_current";
LLVMValueRef current_stack = c->debug.current_stack_ptr = llvm_add_global_raw(c, name, c->ptr_type, 0);
Expand Down Expand Up @@ -575,6 +575,7 @@ void llvm_emit_body(GenContext *c, LLVMValueRef function, FunctionPrototype *pro
LLVMBuildRetVoid(c->builder);
LLVMDisposeBuilder(c->builder);
c->builder = NULL;
c->builder = prev_builder;
}
c->opt_var = NULL;
c->catch_block = NULL;
Expand Down

0 comments on commit 686ba5f

Please sign in to comment.