aboutsummaryrefslogtreecommitdiff
path: root/src/ir.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2017-12-08 12:28:21 -0500
committerAndrew Kelley <superjoe30@gmail.com>2017-12-08 12:28:21 -0500
commit3577a80bb67923c0c165bd3c6e57ef3248e1b59c (patch)
treeafd7d706774c014cda6f8d596973907caf8d3fb1 /src/ir.cpp
parent182cf5b8de375080bff6f2bb91cd398e776da16c (diff)
downloadzig-3577a80bb67923c0c165bd3c6e57ef3248e1b59c.tar.gz
zig-3577a80bb67923c0c165bd3c6e57ef3248e1b59c.zip
translate-c: more complex logic for translating a C cast in a macro
Diffstat (limited to 'src/ir.cpp')
-rw-r--r--src/ir.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ir.cpp b/src/ir.cpp
index 0512ab5e36..62927f46a0 100644
--- a/src/ir.cpp
+++ b/src/ir.cpp
@@ -14052,6 +14052,9 @@ static TypeTableEntry *ir_analyze_instruction_c_import(IrAnalyze *ira, IrInstruc
ImportTableEntry *child_import = allocate<ImportTableEntry>(1);
child_import->decls_scope = create_decls_scope(node, nullptr, nullptr, child_import);
child_import->c_import_node = node;
+ child_import->package = new_anonymous_package();
+ child_import->package->package_table.put(buf_create_from_str("builtin"), ira->codegen->compile_var_package);
+ child_import->package->package_table.put(buf_create_from_str("std"), ira->codegen->std_package);
ZigList<ErrorMsg *> errors = {0};