From fb167d1d0aa5b428dc1f477e8879d68664d155d9 Mon Sep 17 00:00:00 2001 From: Fabian Sperber Date: Mon, 11 Jul 2022 21:03:46 +0200 Subject: 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 --- src/llvm_backend_debug.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/llvm_backend_debug.cpp') 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 -- cgit v1.2.3