authorgravatar for liljaanton2001@gmail.comantlilja <liljaanton2001@gmail.com> 2024-02-22 16:07:25+01:00
committergravatar for liljaanton2001@gmail.comantlilja <liljaanton2001@gmail.com> 2024-02-22 16:07:25+01:00
log6cc51d3c3311a5d37401ec141424b30f57f62693
treeb69e548b5298c9003d9e50c91028d714f6e0ddbd
parentde536e84739e949ed5bd85be9a263f74c70e7b94

LLVM: Set new debug location after inlining


1 files changed, 8 insertions(+), 0 deletions(-)

src/codegen/llvm.zig+8
...@@ -6625,6 +6625,13 @@ pub const FuncGen = struct {...@@ -6625,6 +6625,13 @@ pub const FuncGen = struct {
6625 );6625 );
6626 self.scope = lexical_block;6626 self.scope = lexical_block;
6627 self.base_line = decl.src_line;6627 self.base_line = decl.src_line;
6628 const inlined_at = self.wip.current_debug_location;
6629 self.wip.current_debug_location = try o.builder.debugLocation(
6630 line_number,
6631 0,
6632 self.scope,
6633 inlined_at,
6634 );
6628 return .none;6635 return .none;
6629 }6636 }
66306637
...@@ -6641,6 +6648,7 @@ pub const FuncGen = struct {...@@ -6641,6 +6648,7 @@ pub const FuncGen = struct {
6641 const old = self.inlined.pop();6648 const old = self.inlined.pop();
6642 self.scope = old.scope;6649 self.scope = old.scope;
6643 self.base_line = old.base_line;6650 self.base_line = old.base_line;
6651 self.wip.current_debug_location = old.location;
6644 return .none;6652 return .none;
6645 }6653 }
66466654