aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2016-03-01 15:26:41 -0700
committerAndrew Kelley <superjoe30@gmail.com>2016-03-01 15:26:41 -0700
commit5df091fea98e91536f95e3b4bd5bcb0881f06989 (patch)
tree72e34976d9bf0119a1f72cc9f991192c558de9c1 /src/codegen.cpp
parent660a50661b22b279fed548387d19ffcddb031b23 (diff)
downloadzig-5df091fea98e91536f95e3b4bd5bcb0881f06989.tar.gz
zig-5df091fea98e91536f95e3b4bd5bcb0881f06989.zip
c_void is provided outside of C imports
Diffstat (limited to 'src/codegen.cpp')
-rw-r--r--src/codegen.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp
index 4ee6074e21..b1edd1b4f9 100644
--- a/src/codegen.cpp
+++ b/src/codegen.cpp
@@ -3552,6 +3552,11 @@ static void define_builtin_types(CodeGen *g) {
g->builtin_types.entry_i64 = get_int_type(g, true, 64);
{
+ g->builtin_types.entry_c_void = get_typedecl_type(g, "c_void", g->builtin_types.entry_u8);
+ g->primitive_type_table.put(&g->builtin_types.entry_c_void->name, g->builtin_types.entry_c_void);
+ }
+
+ {
TypeTableEntry *entry = new_type_table_entry(TypeTableEntryIdPureError);
buf_init_from_str(&entry->name, "error");