From a01bc7776fe3d987e7e9e6346c43480ac260c40e Mon Sep 17 00:00:00 2001 From: Jacob Young Date: Sat, 10 Jun 2023 17:46:17 -0400 Subject: [PATCH] llvm: fix name lifetime --- src/codegen/llvm.zig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/codegen/llvm.zig b/src/codegen/llvm.zig index 723a55002703..ab4c7581bf87 100644 --- a/src/codegen/llvm.zig +++ b/src/codegen/llvm.zig @@ -1169,13 +1169,14 @@ pub const Object = struct { llvm.DIFlags.NoReturn else 0; + const decl_di_ty = try o.lowerDebugType(decl.ty, .full); const subprogram = dib.createFunction( di_file.?.toScope(), mod.intern_pool.stringToSlice(decl.name), llvm_func.getValueName(), di_file.?, line_number, - try o.lowerDebugType(decl.ty, .full), + decl_di_ty, is_internal_linkage, true, // is definition line_number + func.lbrace_line, // scope line