aboutsummaryrefslogtreecommitdiff
path: root/src/tilde_const.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tilde_const.cpp')
-rw-r--r--src/tilde_const.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/tilde_const.cpp b/src/tilde_const.cpp
index 6f9736554..7a8be70c7 100644
--- a/src/tilde_const.cpp
+++ b/src/tilde_const.cpp
@@ -17,7 +17,7 @@ gb_internal cgValue cg_const_nil(cgProcedure *p, Type *type) {
}
if (is_type_internally_pointer_like(type)) {
- return cg_value(tb_inst_ptr(p->func, 0), type);
+ return cg_value(tb_inst_uint(p->func, dt, 0), type);
} else if (is_type_integer(type) || is_type_boolean(type) || is_type_bit_set(type)) {
return cg_value(tb_inst_uint(p->func, dt, 0), type);
} else if (is_type_float(type)) {
@@ -34,7 +34,7 @@ gb_internal cgValue cg_const_nil(cgProcedure *p, Type *type) {
return {};
}
-gb_internal cgValue cg_const_value(cgProcedure *p, Type *type, ExactValue const &value) {
+gb_internal cgValue cg_const_value(cgModule *m, cgProcedure *p, Type *type, ExactValue const &value) {
TB_Node *node = nullptr;
if (value.kind == ExactValue_Invalid) {
@@ -42,4 +42,9 @@ gb_internal cgValue cg_const_value(cgProcedure *p, Type *type, ExactValue const
}
return cg_value(node, type);
+}
+
+gb_internal cgValue cg_const_value(cgProcedure *p, Type *type, ExactValue const &value) {
+ GB_ASSERT(p != nullptr);
+ return cg_const_value(p->module, p, type, value);
} \ No newline at end of file