From aa56f016f73063371431b8b2587538c79af97bd9 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Tue, 15 Dec 2015 20:08:53 -0700 Subject: support addressof operator and struct pointer field access --- src/codegen.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/codegen.cpp') 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"); } -- cgit v1.2.3