From 28be0ad69b98868c5a77f0fe9d2898391b1ac400 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Fri, 28 Jul 2017 11:35:01 +0100 Subject: Fix IR print bug for empty structs; --- src/ir.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/ir.cpp') diff --git a/src/ir.cpp b/src/ir.cpp index 36efefb94..6603ac2e9 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -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; -- cgit v1.2.3