aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2015-12-15 20:08:53 -0700
committerAndrew Kelley <superjoe30@gmail.com>2015-12-15 20:08:53 -0700
commitaa56f016f73063371431b8b2587538c79af97bd9 (patch)
tree30ab1eecc5161a9cf60971735537c29af484b187 /src/codegen.cpp
parent5a8822c714e4ee2d442e76f36213d119530f0fea (diff)
downloadzig-aa56f016f73063371431b8b2587538c79af97bd9.tar.gz
zig-aa56f016f73063371431b8b2587538c79af97bd9.zip
support addressof operator and struct pointer field access
Diffstat (limited to 'src/codegen.cpp')
-rw-r--r--src/codegen.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp
index 0cc803d63c..c29e3653eb 100644
--- a/src/codegen.cpp
+++ b/src/codegen.cpp
@@ -248,6 +248,8 @@ static LLVMValueRef gen_field_access_expr(CodeGen *g, AstNode *node) {
TypeTableEntry *type_entry;
LLVMValueRef ptr = gen_field_ptr(g, node, &type_entry);
return LLVMBuildLoad(g->builder, ptr, "");
+ } else if (struct_type->id == TypeTableEntryIdPointer) {
+ zig_panic("TODO struct pointer access");
} else {
zig_panic("gen_field_access_expr bad struct type");
}