Fix issue #37 for procedure literal scopes

This commit is contained in:
Ginger Bill
2017-04-16 22:48:29 +01:00
parent 187b186112
commit d1a0a46141
2 changed files with 45 additions and 17 deletions
+1 -1
View File
@@ -1270,7 +1270,7 @@ irValue *ir_add_local(irProcedure *proc, Entity *e, AstNode *expr) {
ir_emit_zero_init(proc, instr);
// }
if (expr != NULL) {
if (expr != NULL && proc->entity != NULL) {
irDebugInfo *di = *map_ir_debug_info_get(&proc->module->debug_info, hash_pointer(proc->entity));
ir_emit(proc, ir_instr_debug_declare(proc, di, expr, e, true, instr));
}