diff options
| author | Fabian Sperber <fabian.sperber@gmx.net> | 2022-07-11 21:03:46 +0200 |
|---|---|---|
| committer | Fabian Sperber <fabian.sperber@gmx.net> | 2022-07-19 00:46:27 +0200 |
| commit | fb167d1d0aa5b428dc1f477e8879d68664d155d9 (patch) | |
| tree | 3b22ae33b66a3dee60bae3881991471362970e65 /src/llvm_backend_debug.cpp | |
| parent | 0992239d86dd8e59cc6324ec5f1d84dee6427271 (diff) | |
Fix loop var (init) becoming hidden while stepping on the for-line
- set debug location of jumps between block (similar to clang to the location of 'for')
- extend scope range to include all parts of the for-stmt
Diffstat (limited to 'src/llvm_backend_debug.cpp')
| -rw-r--r-- | src/llvm_backend_debug.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/llvm_backend_debug.cpp b/src/llvm_backend_debug.cpp index 207164c63..29e074473 100644 --- a/src/llvm_backend_debug.cpp +++ b/src/llvm_backend_debug.cpp @@ -43,6 +43,10 @@ LLVMMetadataRef lb_debug_location_from_ast(lbProcedure *p, Ast *node) { GB_ASSERT(node != nullptr); return lb_debug_location_from_token_pos(p, ast_token(node).pos); } +LLVMMetadataRef lb_debug_end_location_from_ast(lbProcedure *p, Ast *node) { + GB_ASSERT(node != nullptr); + return lb_debug_location_from_token_pos(p, ast_end_token(node).pos); +} LLVMMetadataRef lb_debug_type_internal_proc(lbModule *m, Type *type) { i64 size = type_size_of(type); // Check size |