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 {
66256625 );
66266626 self.scope = lexical_block;
66276627 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 );
66286635 return .none;
66296636 }
66306637
......@@ -6641,6 +6648,7 @@ pub const FuncGen = struct {
66416648 const old = self.inlined.pop();
66426649 self.scope = old.scope;
66436650 self.base_line = old.base_line;
6651 self.wip.current_debug_location = old.location;
66446652 return .none;
66456653 }
66466654