authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-06-08 16:33:35-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-06-08 16:33:35-04:00
log05d284c842a5ba21cd836c2b212daa24227a9177
tree52875921e0d3c6efab2c88a38f4d5b512386de3c
parent47090d234ecc3e50937c918b05e6f039a53d880c

update sort callsite to new API


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

lib/std/debug.zig+3-3
...@@ -1003,7 +1003,7 @@ fn readMachODebugInfo(allocator: *mem.Allocator, macho_file: File) !ModuleDebugI...@@ -1003,7 +1003,7 @@ fn readMachODebugInfo(allocator: *mem.Allocator, macho_file: File) !ModuleDebugI
1003 // Even though lld emits symbols in ascending order, this debug code1003 // Even though lld emits symbols in ascending order, this debug code
1004 // should work for programs linked in any valid way.1004 // should work for programs linked in any valid way.
1005 // This sort is so that we can binary search later.1005 // This sort is so that we can binary search later.
1006 std.sort.sort(MachoSymbol, symbols, MachoSymbol.addressLessThan);1006 std.sort.sort(MachoSymbol, symbols, {}, MachoSymbol.addressLessThan);
10071007
1008 return ModuleDebugInfo{1008 return ModuleDebugInfo{
1009 .base_address = undefined,1009 .base_address = undefined,
...@@ -1058,7 +1058,7 @@ const MachoSymbol = struct {...@@ -1058,7 +1058,7 @@ const MachoSymbol = struct {
1058 return self.nlist.n_value;1058 return self.nlist.n_value;
1059 }1059 }
10601060
1061 fn addressLessThan(lhs: MachoSymbol, rhs: MachoSymbol) bool {1061 fn addressLessThan(context: void, lhs: MachoSymbol, rhs: MachoSymbol) bool {
1062 return lhs.address() < rhs.address();1062 return lhs.address() < rhs.address();
1063 }1063 }
1064};1064};
...@@ -1300,7 +1300,7 @@ pub const DebugInfo = struct {...@@ -1300,7 +1300,7 @@ pub const DebugInfo = struct {
1300 fs.cwd().openFile(ctx.name, .{ .intended_io_mode = .blocking })1300 fs.cwd().openFile(ctx.name, .{ .intended_io_mode = .blocking })
1301 else1301 else
1302 fs.openSelfExe(.{ .intended_io_mode = .blocking });1302 fs.openSelfExe(.{ .intended_io_mode = .blocking });
1303 1303
1304 const elf_file = copy catch |err| switch (err) {1304 const elf_file = copy catch |err| switch (err) {
1305 error.FileNotFound => return error.MissingDebugInfo,1305 error.FileNotFound => return error.MissingDebugInfo,
1306 else => return err,1306 else => return err,