aboutsummaryrefslogtreecommitdiff
path: root/src/ir.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2017-11-28 22:49:34 +0000
committergingerBill <bill@gingerbill.org>2017-11-28 22:49:34 +0000
commitcc28cda05371bd6add5c9af1db1c771c68d32c4d (patch)
treed6d12769b0f6a701c308eed3acc8205ec82409e9 /src/ir.cpp
parentcfabc0e61f2c3dc00fd367e3f9bf1a89461971ef (diff)
Fix issue #156
Diffstat (limited to 'src/ir.cpp')
-rw-r--r--src/ir.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/ir.cpp b/src/ir.cpp
index 3128bfd5d..83304596f 100644
--- a/src/ir.cpp
+++ b/src/ir.cpp
@@ -1574,8 +1574,6 @@ irValue *ir_emit_bitcast(irProcedure *proc, irValue *data, Type *type) {
irValue *ir_emit_transmute(irProcedure *proc, irValue *value, Type *t);
-irValue *ir_emit_global_call(irProcedure *proc, char *name_, irValue **args, isize arg_count);
-
irValue *ir_find_or_generate_context_ptr(irProcedure *proc) {
if (proc->context_stack.count > 0) {
return proc->context_stack[proc->context_stack.count-1];
@@ -1635,8 +1633,8 @@ irValue *ir_emit_call(irProcedure *p, irValue *value, irValue **args, isize arg_
return result;
}
-irValue *ir_emit_global_call(irProcedure *proc, char *name_, irValue **args, isize arg_count) {
- String name = make_string_c(name_);
+irValue *ir_emit_global_call(irProcedure *proc, char const *name_, irValue **args, isize arg_count) {
+ String name = make_string_c(cast(char *)name_);
irValue **found = map_get(&proc->module->members, hash_string(name));
GB_ASSERT_MSG(found != nullptr, "%.*s", LIT(name));
irValue *gp = *found;
@@ -3652,7 +3650,7 @@ void ir_emit_slice_bounds_check(irProcedure *proc, Token token, irValue *low, ir
args[3] = low;
args[4] = high;
- char *func = is_substring ? "__substring_expr_error" : "__slice_expr_error";
+ char const *func = is_substring ? "__substring_expr_error" : "__slice_expr_error";
ir_emit_global_call(proc, func, args, 5);
}