aboutsummaryrefslogtreecommitdiff
path: root/src/tilde_const.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2023-07-24 10:27:55 +0100
committergingerBill <bill@gingerbill.org>2023-07-24 10:27:55 +0100
commit241a939c2985b0d9ad65dd305af6e84c82554e39 (patch)
tree22cec65b92d28319ad0f0127642c0d84693cdaae /src/tilde_const.cpp
parent2f9c5d2d0b500518acecb9badd4b6947db6fd536 (diff)
Update Tilde
Diffstat (limited to 'src/tilde_const.cpp')
-rw-r--r--src/tilde_const.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/tilde_const.cpp b/src/tilde_const.cpp
index bb4a294a5..11126e07a 100644
--- a/src/tilde_const.cpp
+++ b/src/tilde_const.cpp
@@ -887,6 +887,7 @@ gb_internal cgValue cg_const_value(cgProcedure *p, Type *type, ExactValue const
char name[32] = {};
gb_snprintf(name, 31, "csb$%u", 1+m->const_nil_guid.fetch_add(1));
TB_Global *cstr_global = tb_global_create(m->mod, -1, name, nullptr, TB_LINKAGE_PRIVATE);
+
i64 size = str.len+1;
tb_global_set_storage(m->mod, tb_module_get_rdata(m->mod), cstr_global, size, 1, 1);
u8 *data = cast(u8 *)tb_global_add_region(m->mod, cstr_global, 0, size);