diff options
| author | gingerBill <bill@gingerbill.org> | 2023-07-25 15:15:35 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2023-07-25 15:15:35 +0100 |
| commit | 0f217c715ecd9fc265b1c6a3d579b99ecf849139 (patch) | |
| tree | af3a2b1847c5066e89d7c11365c45945800b464d /src/tilde_debug.cpp | |
| parent | c4033c215e01343709a0d7928c277a6425f53524 (diff) | |
Fix dependency issue; Allow polymorphic procedures in tilde
Diffstat (limited to 'src/tilde_debug.cpp')
| -rw-r--r-- | src/tilde_debug.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/tilde_debug.cpp b/src/tilde_debug.cpp index e6e60be96..708476377 100644 --- a/src/tilde_debug.cpp +++ b/src/tilde_debug.cpp @@ -76,9 +76,18 @@ gb_internal TB_DebugType *cg_debug_type_internal_record(cgModule *m, Type *type, type_set_offsets(bt); TB_DebugType *record = tb_debug_create_struct(m->mod, 0, ""); - TB_DebugType **fields = tb_debug_record_begin(record, bt->Tuple.variables.count); + isize record_count = 0; + for (Entity *e : bt->Tuple.variables) { + if (e->kind == Entity_Variable) { + record_count += 1; + } + } + TB_DebugType **fields = tb_debug_record_begin(record, record_count); for_array(i, bt->Tuple.variables) { Entity *e = bt->Tuple.variables[i]; + if (e->kind != Entity_Variable) { + continue; + } Type *type = e->type; if (is_type_proc(type)) { type = t_rawptr; |