stack trace is able to figure out compilation unit

each address is contained within

also fix a bug having to do with codegen for enum value
initialization expressions
This commit is contained in:
Andrew Kelley
2016-09-23 02:00:23 -04:00
parent 4b902b44a2
commit 46eb77dbb2
9 changed files with 377 additions and 175 deletions

View File

@@ -729,7 +729,6 @@ static LLVMValueRef gen_enum_value_expr(CodeGen *g, AstNode *node, TypeTableEntr
LLVMValueRef new_union_val = gen_expr(g, arg_node);
if (arg_node) {
arg_node_type = get_expr_type(arg_node);
new_union_val = gen_expr(g, arg_node);
} else {
arg_node_type = g->builtin_types.entry_void;
}
@@ -3460,6 +3459,7 @@ static LLVMValueRef gen_switch_expr(CodeGen *g, AstNode *node) {
zig_unreachable();
}
if (make_item_blocks) {
set_debug_source_node(g, var_node);
LLVMBuildBr(g->builder, prong_block);
}
} else {