diff options
| author | gingerBill <bill@gingerbill.org> | 2023-07-07 22:28:31 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2023-07-07 22:28:31 +0100 |
| commit | 1ff6212ffa32c42be86ee80292401f860435b443 (patch) | |
| tree | 6606ce9078be52a2c1815fcbdedf2bb0a84ac7ab /src/llvm_backend_general.cpp | |
| parent | b60d29ae9a9a155308aac2e318a881bc87c6da00 (diff) | |
Always call `lb_run_remove_dead_instruction_pass` to fix `-debug` issues
Diffstat (limited to 'src/llvm_backend_general.cpp')
| -rw-r--r-- | src/llvm_backend_general.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/llvm_backend_general.cpp b/src/llvm_backend_general.cpp index 017eeca2e..676069120 100644 --- a/src/llvm_backend_general.cpp +++ b/src/llvm_backend_general.cpp @@ -3004,8 +3004,9 @@ gb_internal lbAddr lb_add_local(lbProcedure *p, Type *type, Entity *e, bool zero LLVMPositionBuilderAtEnd(p->builder, p->decl_block->block); char const *name = ""; - if (e != nullptr) { - // name = alloc_cstring(permanent_allocator(), e->token.string); + if (e != nullptr && e->token.string.len > 0 && e->token.string != "_") { + // NOTE(bill): for debugging purposes only + name = alloc_cstring(permanent_allocator(), e->token.string); } LLVMTypeRef llvm_type = lb_type(p->module, type); |