string literals have type *const u8

This commit is contained in:
Josh Wolfe
2015-12-01 14:41:03 -07:00
parent ab327344b6
commit c6a9ab107b
6 changed files with 56 additions and 38 deletions

View File

@@ -589,6 +589,7 @@ static void define_primitive_types(CodeGen *g) {
g->type_table.put(&entry->name, entry);
g->builtin_types.entry_u8 = entry;
}
g->builtin_types.entry_string_literal = get_pointer_to_type(g, g->builtin_types.entry_u8, true);
{
TypeTableEntry *entry = allocate<TypeTableEntry>(1);
entry->type_ref = LLVMInt32Type();