aboutsummaryrefslogtreecommitdiff
path: root/src/llvm_backend_stmt.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2021-08-23 16:45:52 +0100
committergingerBill <bill@gingerbill.org>2021-08-23 16:45:52 +0100
commitb014879159a33a86bf94d673152cc51120fc3e72 (patch)
treefe29f103807dd0d7b3200448fa7f5e2a23bb2bf6 /src/llvm_backend_stmt.cpp
parent81623861c034a40e47b2a5003532789c559bb9d8 (diff)
Add extra message to assert
Diffstat (limited to 'src/llvm_backend_stmt.cpp')
-rw-r--r--src/llvm_backend_stmt.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/llvm_backend_stmt.cpp b/src/llvm_backend_stmt.cpp
index 303d58ce1..148790ac6 100644
--- a/src/llvm_backend_stmt.cpp
+++ b/src/llvm_backend_stmt.cpp
@@ -2081,7 +2081,8 @@ void lb_build_stmt(lbProcedure *p, Ast *node) {
Ast *name = vd->names[i];
if (!is_blank_ident(name)) {
Entity *e = entity_of_node(name);
- GB_ASSERT(e != nullptr);
+ TokenPos pos = ast_token(name).pos;
+ GB_ASSERT_MSG(e != nullptr, "%s", token_pos_to_string(pos));
if (e->flags & EntityFlag_Static) {
// NOTE(bill): If one of the entities is static, they all are
is_static = true;