aboutsummaryrefslogtreecommitdiff
path: root/src/tilde.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2023-08-19 12:26:59 +0100
committergingerBill <bill@gingerbill.org>2023-08-19 12:26:59 +0100
commit0cb9908f27b9b6e28b968bd8abb7c5f46d203c97 (patch)
treeceabdbc6f3c637eaac1a5fc4025e298632039485 /src/tilde.cpp
parent15033eab28d8261e65addb70d931d514a73530c7 (diff)
Update Tilde
Diffstat (limited to 'src/tilde.cpp')
-rw-r--r--src/tilde.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/tilde.cpp b/src/tilde.cpp
index a0f1fd844..b27c42a12 100644
--- a/src/tilde.cpp
+++ b/src/tilde.cpp
@@ -213,9 +213,9 @@ gb_internal cgAddr cg_addr_soa_variable(cgValue addr, cgValue index, Ast *index_
gb_internal void cg_set_debug_pos_from_node(cgProcedure *p, Ast *node) {
if (node) {
TokenPos pos = ast_token(node).pos;
- TB_FileID *file_id = map_get(&p->module->file_id_map, cast(uintptr)pos.file_id);
- if (file_id) {
- tb_inst_set_location(p->func, *file_id, pos.line);
+ TB_SourceFile **file = map_get(&p->module->file_id_map, cast(uintptr)pos.file_id);
+ if (file) {
+ tb_inst_set_location(p->func, *file, pos.line, pos.column);
}
}
}
@@ -464,8 +464,9 @@ gb_internal cgModule *cg_module_create(Checker *c) {
for_array(id, global_files) {
if (AstFile *f = global_files[id]) {
- char const *path = alloc_cstring(permanent_allocator(), f->fullpath);
- map_set(&m->file_id_map, cast(uintptr)id, tb_file_create(m->mod, path));
+ char const *path = alloc_cstring(temporary_allocator(), f->fullpath);
+ TB_SourceFile *file = tb_get_source_file(m->mod, path);
+ map_set(&m->file_id_map, cast(uintptr)id, file);
}
}