| ... | @@ -3505,6 +3505,7 @@ static void render_decl_var(CodeGen *g, ZigVar *var) { | ... | @@ -3505,6 +3505,7 @@ static void render_decl_var(CodeGen *g, ZigVar *var) { |
| 3505 | | 3505 | |
| 3506 | static LLVMValueRef ir_render_decl_var(CodeGen *g, IrExecutableGen *executable, IrInstGenDeclVar *instruction) { | 3506 | static LLVMValueRef ir_render_decl_var(CodeGen *g, IrExecutableGen *executable, IrInstGenDeclVar *instruction) { |
| 3507 | instruction->var->ptr_instruction = instruction->var_ptr; | 3507 | instruction->var->ptr_instruction = instruction->var_ptr; |
| | 3508 | instruction->var->did_the_decl_codegen = true; |
| 3508 | render_decl_var(g, instruction->var); | 3509 | render_decl_var(g, instruction->var); |
| 3509 | return nullptr; | 3510 | return nullptr; |
| 3510 | } | 3511 | } |
| ... | @@ -3973,7 +3974,7 @@ static void render_async_var_decls(CodeGen *g, Scope *scope) { | ... | @@ -3973,7 +3974,7 @@ static void render_async_var_decls(CodeGen *g, Scope *scope) { |
| 3973 | return; | 3974 | return; |
| 3974 | case ScopeIdVarDecl: { | 3975 | case ScopeIdVarDecl: { |
| 3975 | ZigVar *var = reinterpret_cast<ScopeVarDecl *>(scope)->var; | 3976 | ZigVar *var = reinterpret_cast<ScopeVarDecl *>(scope)->var; |
| 3976 | if (var->ptr_instruction != nullptr) { | 3977 | if (var->did_the_decl_codegen) { |
| 3977 | render_decl_var(g, var); | 3978 | render_decl_var(g, var); |
| 3978 | } | 3979 | } |
| 3979 | // fallthrough | 3980 | // fallthrough |