Fix IR print bug for empty structs;

This commit is contained in:
gingerBill
2017-07-28 11:35:01 +01:00
parent f0980c0a98
commit 28be0ad69b
5 changed files with 29 additions and 11 deletions
+2 -3
View File
@@ -6370,9 +6370,8 @@ void ir_build_stmt_internal(irProcedure *proc, AstNode *node) {
case_ast_node(ds, DeferStmt, node);
ir_emit_comment(proc, str_lit("DeferStmt"));
isize scope_index = proc->scope_index;
if (ds->stmt->kind == AstNode_BlockStmt) {
scope_index--;
}
// TODO(bill): What was the original rationale behind this line?
// if (ds->stmt->kind == AstNode_BlockStmt) scope_index--;
ir_add_defer_node(proc, scope_index, ds->stmt);
case_end;