diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2024-08-05 19:19:10 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2024-08-07 00:48:32 -0700 |
| commit | 8dae629c4f89155b6945ee952ee2aeb5bfa1d271 (patch) | |
| tree | 481c61cda9711fbded6f52442c3ac95f42c3084c /lib/std/debug/Dwarf.zig | |
| parent | 529df8c0075a1a91860523ed33c475473d332ae3 (diff) | |
| download | zig-8dae629c4f89155b6945ee952ee2aeb5bfa1d271.tar.gz zig-8dae629c4f89155b6945ee952ee2aeb5bfa1d271.zip | |
update branch for latest std.sort changes
Diffstat (limited to 'lib/std/debug/Dwarf.zig')
| -rw-r--r-- | lib/std/debug/Dwarf.zig | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/std/debug/Dwarf.zig b/lib/std/debug/Dwarf.zig index cd37795351..caf04aca4d 100644 --- a/lib/std/debug/Dwarf.zig +++ b/lib/std/debug/Dwarf.zig @@ -157,7 +157,11 @@ pub const CompileUnit = struct { }; pub fn findSource(slc: *const SrcLocCache, address: u64) !LineEntry { - const index = std.sort.upperBound(u64, address, slc.line_table.keys(), {}, std.sort.asc(u64)); + const index = std.sort.upperBound(u64, slc.line_table.keys(), address, struct { + fn order(context: u64, item: u64) std.math.Order { + return std.math.order(item, context); + } + }.order); if (index == 0) return missing(); return slc.line_table.values()[index - 1]; } |
