deprecated attribute for procedure declarations

This commit is contained in:
gingerBill
2018-03-03 11:16:48 +00:00
parent 08c87e57f8
commit 9274f29ca9
10 changed files with 89 additions and 24 deletions
+3 -3
View File
@@ -548,17 +548,17 @@ void ir_print_exact_value(irFileBuffer *f, irModule *m, ExactValue value, Type *
break;
case ExactValue_String: {
String str = value.value_string;
if (str.len == 0) {
Type *t = core_type(type);
if (str.len == 0 && !is_type_cstring(t)) {
ir_write_str_lit(f, "zeroinitializer");
break;
}
Type *t = core_type(type);
if (!is_type_string(type)) {
GB_ASSERT(is_type_array(type));
ir_write_str_lit(f, "c\"");
ir_print_escape_string(f, str, false, false);
ir_write_str_lit(f, "\\00\"");
} else if (t == t_cstring) {
} else if (is_type_cstring(t)) {
// HACK NOTE(bill): This is a hack but it works because strings are created at the very end
// of the .ll file
irValue *str_array = ir_add_global_string_array(m, str);