diff options
| author | lachsinc <lachlansinclair@gmail.com> | 2018-10-05 12:46:53 +1000 |
|---|---|---|
| committer | lachsinc <lachlansinclair@gmail.com> | 2018-10-05 12:46:53 +1000 |
| commit | dfeefc51799372307036ea9520261ee0d6059dc1 (patch) | |
| tree | cb2f76467d007e05ee65d0f54f8bc231113a67e4 /src | |
| parent | ab46406f4d3eaa4625c96db673c35d0cd96a5575 (diff) | |
Fix dgb.declare using different location to it's associated instructions.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ir.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/ir.cpp b/src/ir.cpp index 529b5a609..956959141 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -1432,13 +1432,11 @@ irValue *ir_add_local(irProcedure *proc, Entity *e, Ast *expr, bool zero_initial if (expr != nullptr && proc->entity != nullptr) { GB_ASSERT_NOT_NULL(proc->debug_scope); - ir_push_debug_location(proc->module, expr, proc->debug_scope); - + ir_emit(proc, ir_instr_debug_declare(proc, expr, e, true, instr)); // TODO(lachsinc): "Arg" is not used yet but should be eventually, if applicable, set to param index. ir_add_debug_info_local(proc, e, 0); - ir_pop_debug_location(proc->module); } return instr; |