From 49fa3a987f0b5309d629072def14ae6c6793d0b1 Mon Sep 17 00:00:00 2001 From: kcbanner Date: Tue, 25 Jul 2023 00:45:47 -0400 Subject: [PATCH] reduce the number of duplicate instantiations due to differing stream parameters --- lib/std/dwarf.zig | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/std/dwarf.zig b/lib/std/dwarf.zig index 594116fa90..58db4a1698 100644 --- a/lib/std/dwarf.zig +++ b/lib/std/dwarf.zig @@ -741,7 +741,7 @@ pub const DwarfInfo = struct { fn scanAllFunctions(di: *DwarfInfo, allocator: mem.Allocator) !void { var stream = io.fixedBufferStream(di.section(.debug_info).?); const in = stream.reader(); - const seekable = &stream.seekableStream(); + const seekable = stream.seekableStream(); var this_unit_offset: u64 = 0; var tmp_arena = std.heap.ArenaAllocator.init(allocator); @@ -909,8 +909,8 @@ pub const DwarfInfo = struct { fn scanAllCompileUnits(di: *DwarfInfo, allocator: mem.Allocator) !void { var stream = io.fixedBufferStream(di.section(.debug_info).?); - const in = &stream.reader(); - const seekable = &stream.seekableStream(); + const in = stream.reader(); + const seekable = stream.seekableStream(); var this_unit_offset: u64 = 0; while (this_unit_offset < try seekable.getEndPos()) { @@ -1175,8 +1175,8 @@ pub const DwarfInfo = struct { fn parseAbbrevTable(di: *DwarfInfo, allocator: mem.Allocator, offset: u64) !AbbrevTable { var stream = io.fixedBufferStream(di.section(.debug_abbrev).?); - const in = &stream.reader(); - const seekable = &stream.seekableStream(); + const in = stream.reader(); + const seekable = stream.seekableStream(); try seekable.seekTo(offset); var result = AbbrevTable.init(allocator); @@ -1256,8 +1256,8 @@ pub const DwarfInfo = struct { target_address: u64, ) !debug.LineInfo { var stream = io.fixedBufferStream(di.section(.debug_line).?); - const in = &stream.reader(); - const seekable = &stream.seekableStream(); + const in = stream.reader(); + const seekable = stream.seekableStream(); const compile_unit_cwd = try compile_unit.die.getAttrString(di, AT.comp_dir, di.section(.debug_line_str), compile_unit); const line_info_offset = try compile_unit.die.getAttrSecOffset(AT.stmt_list);