Skip to content

Commit

Permalink
llvm: fix name lifetime
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobly0 authored and andrewrk committed Jun 11, 2023
1 parent f94c668 commit a01bc77
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/codegen/llvm.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a01bc77

Please sign in to comment.