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) {...@@ -311,7 +311,7 @@ pub const BinaryAnnotation = union(enum) {
311 prev: ?PartialRange,311 prev: ?PartialRange,
312312
313 const PartialRange = struct {313 const PartialRange = struct {
314 line_offset: u32,314 line_offset: i32,
315 file_id: ?u32,315 file_id: ?u32,
316 code_offset: u32,316 code_offset: u32,
317 code_length: ?u32,317 code_length: ?u32,
...@@ -331,7 +331,7 @@ pub const BinaryAnnotation = union(enum) {...@@ -331,7 +331,7 @@ pub const BinaryAnnotation = union(enum) {
331 }331 }
332332
333 pub const Range = struct {333 pub const Range = struct {
334 line_offset: u32,334 line_offset: i32,
335 file_id: ?u32,335 file_id: ?u32,
336 code_offset: u32,336 code_offset: u32,
337 code_length: u32,337 code_length: u32,
...@@ -364,11 +364,11 @@ pub const BinaryAnnotation = union(enum) {...@@ -364,11 +364,11 @@ pub const BinaryAnnotation = union(enum) {
364 self.curr.code_offset += info.delta;364 self.curr.code_offset += info.delta;
365 },365 },
366 .change_line_offset => |delta| {366 .change_line_offset => |delta| {
367 self.curr.line_offset +%= @bitCast(delta);367 self.curr.line_offset += delta;
368 },368 },
369 .change_code_offset_and_line_offset => |info| {369 .change_code_offset_and_line_offset => |info| {
370 self.curr.code_offset += info.code_delta;370 self.curr.code_offset += info.code_delta;
371 self.curr.line_offset +%= @bitCast(info.line_delta);371 self.curr.line_offset += info.line_delta;
372 },372 },
373373
374 // Not emitted by LLVM at the time of writing, but if we get it from elsewhere it should374 // 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(...@@ -608,7 +608,7 @@ pub fn getInlineSiteSourceLocation(
608 errdefer self.allocator.free(file_name);608 errdefer self.allocator.free(file_name);
609609
610 return .{610 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)),
612 // LLVM doesn't currently emit column information for inlined calls in PDBs.612 // LLVM doesn't currently emit column information for inlined calls in PDBs.
613 .column = 0,613 .column = 0,
614 .file_name = file_name,614 .file_name = file_name,