diff options
| author | gingerBill <bill@gingerbill.org> | 2021-04-26 22:36:20 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2021-04-26 22:36:20 +0100 |
| commit | 04535b291310ff53c19fdc96817f2a651b540907 (patch) | |
| tree | 237fe2bb3f824d17f34c5f6dc67e144a761aebb4 /src/llvm_backend.cpp | |
| parent | 6667b78c12503de12b3403c461c1d36505537fb2 (diff) | |
Fix constant aliasing for debug information
Diffstat (limited to 'src/llvm_backend.cpp')
| -rw-r--r-- | src/llvm_backend.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/llvm_backend.cpp b/src/llvm_backend.cpp index 0fd778b9c..758f8e5d1 100644 --- a/src/llvm_backend.cpp +++ b/src/llvm_backend.cpp @@ -3544,7 +3544,9 @@ void lb_build_constant_value_decl(lbProcedure *p, AstValueDecl *vd) { Ast *ident = vd->names[i]; GB_ASSERT(ident->kind == Ast_Ident); Entity *e = entity_of_node(ident); - GB_ASSERT(e != nullptr); + if (e == nullptr) { + continue; + } if (e->kind != Entity_TypeName) { continue; } @@ -3573,7 +3575,9 @@ void lb_build_constant_value_decl(lbProcedure *p, AstValueDecl *vd) { Ast *ident = vd->names[i]; GB_ASSERT(ident->kind == Ast_Ident); Entity *e = entity_of_node(ident); - GB_ASSERT(e != nullptr); + if (e == nullptr) { + continue; + } if (e->kind != Entity_Procedure) { continue; } |