aboutsummaryrefslogtreecommitdiff
path: root/src/ir.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2017-02-03 11:39:24 -0500
committerAndrew Kelley <superjoe30@gmail.com>2017-02-03 11:39:24 -0500
commit71d335e5ccc5c7c37ac40debf78ad3aa096b22d3 (patch)
treeb64024a77a76bf26ed77596125c046321edfb4ff /src/ir.cpp
parentcd7713b1788aeeadf6c46def38d4ef4fa313fe75 (diff)
downloadzig-71d335e5ccc5c7c37ac40debf78ad3aa096b22d3.tar.gz
zig-71d335e5ccc5c7c37ac40debf78ad3aa096b22d3.zip
implement packed structs
closes #183
Diffstat (limited to 'src/ir.cpp')
-rw-r--r--src/ir.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ir.cpp b/src/ir.cpp
index bf85a20f7a..573e4cefad 100644
--- a/src/ir.cpp
+++ b/src/ir.cpp
@@ -5283,8 +5283,9 @@ static IrInstruction *ir_gen_container_decl(IrBuilder *irb, Scope *parent_scope,
TldContainer *tld_container = allocate<TldContainer>(1);
init_tld(&tld_container->base, TldIdContainer, name, visib_mod, node, parent_scope);
- TypeTableEntry *container_type = get_partial_container_type(irb->codegen, parent_scope, kind, node, buf_ptr(name),
- node->data.container_decl.is_extern);
+ ContainerLayout layout = node->data.container_decl.layout;
+ TypeTableEntry *container_type = get_partial_container_type(irb->codegen, parent_scope,
+ kind, node, buf_ptr(name), layout);
ScopeDecls *child_scope = get_container_scope(container_type);
tld_container->type_entry = container_type;