aboutsummaryrefslogtreecommitdiff
path: root/src/llvm_backend_const.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2023-06-13 13:14:59 +0100
committergingerBill <bill@gingerbill.org>2023-06-13 13:14:59 +0100
commit581eebb197cc9905248d59a084a68bd2e64c9830 (patch)
treefd817f6d4bc2a9b8b2fcdae38835387b731bb7eb /src/llvm_backend_const.cpp
parent296674e18b5ce3ba90013fb5d599251c66d8bd18 (diff)
Fix a race condition when produced anonymous procedure literals with `-use-separate-modules`
Diffstat (limited to 'src/llvm_backend_const.cpp')
-rw-r--r--src/llvm_backend_const.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/llvm_backend_const.cpp b/src/llvm_backend_const.cpp
index c9d2f5b26..efe1e4d45 100644
--- a/src/llvm_backend_const.cpp
+++ b/src/llvm_backend_const.cpp
@@ -473,6 +473,7 @@ gb_internal lbValue lb_const_value(lbModule *m, Type *type, ExactValue value, bo
if (value.kind == ExactValue_Procedure) {
lbValue res = {};
Ast *expr = unparen_expr(value.value_procedure);
+ GB_ASSERT(expr != nullptr);
if (expr->kind == Ast_ProcLit) {
res = lb_generate_anonymous_proc_lit(m, str_lit("_proclit"), expr);
} else {