aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/codegen.cpp')
-rw-r--r--src/codegen.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp
index 5fcaac8287..22e9720abb 100644
--- a/src/codegen.cpp
+++ b/src/codegen.cpp
@@ -2212,7 +2212,7 @@ static void do_code_gen(CodeGen *g) {
if (!type_has_bits(var->type)) {
continue;
}
- if (var->ref_count == 0)
+ if (var->is_inline)
continue;
if (var->block_context->node->type == NodeTypeFnDef) {
@@ -2257,6 +2257,7 @@ static void do_code_gen(CodeGen *g) {
VariableTableEntry *variable = param_decl->data.param_decl.variable;
assert(variable);
+ assert(variable->value_ref);
if (!handle_is_ptr(variable->type)) {
clear_debug_source_node(g);
@@ -3015,8 +3016,8 @@ void codegen_add_root_code(CodeGen *g, Buf *src_dir, Buf *src_basename, Buf *sou
}
if (g->verbose) {
- fprintf(stderr, "\nSemantic Analysis:\n");
- fprintf(stderr, "--------------------\n");
+ fprintf(stderr, "\nIR Generation and Semantic Analysis:\n");
+ fprintf(stderr, "--------------------------------------\n");
}
if (!g->error_during_imports) {
semantic_analyze(g);