From 04535b291310ff53c19fdc96817f2a651b540907 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Mon, 26 Apr 2021 22:36:20 +0100 Subject: Fix constant aliasing for debug information --- src/llvm_backend.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/llvm_backend.cpp') 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; } -- cgit v1.2.3