authorgravatar for mason@gamesbymason.comMason Remaley <mason@gamesbymason.com> 2026-04-07 16:24:48-07:00
committergravatar for mason@gamesbymason.comMason Remaley <mason@gamesbymason.com> 2026-04-12 04:01:29-07:00
logfa26ab6fa36a5f8d2a6cf11063d42519854d008c
treeb35d15d43e46493902b6a53ba5b5f7a10f575945
parent094e841f09feebaf28a269650b053e0639783440

Cleans up handling of signed line deltas


1 files changed, 5 insertions(+), 5 deletions(-)

lib/std/debug/Pdb.zig+5-5
......@@ -311,7 +311,7 @@ pub const BinaryAnnotation = union(enum) {
311311 prev: ?PartialRange,
312312
313313 const PartialRange = struct {
314 line_offset: u32,
314 line_offset: i32,
315315 file_id: ?u32,
316316 code_offset: u32,
317317 code_length: ?u32,
......@@ -331,7 +331,7 @@ pub const BinaryAnnotation = union(enum) {
331331 }
332332
333333 pub const Range = struct {
334 line_offset: u32,
334 line_offset: i32,
335335 file_id: ?u32,
336336 code_offset: u32,
337337 code_length: u32,
......@@ -364,11 +364,11 @@ pub const BinaryAnnotation = union(enum) {
364364 self.curr.code_offset += info.delta;
365365 },
366366 .change_line_offset => |delta| {
367 self.curr.line_offset +%= @bitCast(delta);
367 self.curr.line_offset += delta;
368368 },
369369 .change_code_offset_and_line_offset => |info| {
370370 self.curr.code_offset += info.code_delta;
371 self.curr.line_offset +%= @bitCast(info.line_delta);
371 self.curr.line_offset += info.line_delta;
372372 },
373373
374374 // Not emitted by LLVM at the time of writing, but if we get it from elsewhere it should
......@@ -608,7 +608,7 @@ pub fn getInlineSiteSourceLocation(
608608 errdefer self.allocator.free(file_name);
609609
610610 return .{
611 .line = inlinee_src_line.source_line_num + range.line_offset,
611 .line = inlinee_src_line.source_line_num +% @as(u32, @bitCast(range.line_offset)),
612612 // LLVM doesn't currently emit column information for inlined calls in PDBs.
613613 .column = 0,
614614 .file_name = file_name,