mirror of
https://github.com/ziglang/zig.git
synced 2026-01-20 14:25:16 +00:00
Remove unnecessary branch on absolute path
Also remove the TODO--it was added in fd067fbe8b14c445ed764da15fff5163156126df, but the current code no longer used that workaround, so this TODO didn't seem relevant anymore.
This commit is contained in:
parent
f4e426a06c
commit
fcc071c9bd
@ -1078,13 +1078,8 @@ pub fn readElfDebugInfo(
|
||||
parent_mapped_mem: ?[]align(mem.page_size) const u8,
|
||||
) !ModuleDebugInfo {
|
||||
nosuspend {
|
||||
|
||||
// TODO https://github.com/ziglang/zig/issues/5525
|
||||
const elf_file = (if (elf_filename) |filename| blk: {
|
||||
break :blk if (fs.path.isAbsolute(filename))
|
||||
fs.openFileAbsolute(filename, .{ .intended_io_mode = .blocking })
|
||||
else
|
||||
fs.cwd().openFile(filename, .{ .intended_io_mode = .blocking });
|
||||
break :blk fs.cwd().openFile(filename, .{ .intended_io_mode = .blocking });
|
||||
} else fs.openSelfExe(.{ .intended_io_mode = .blocking })) catch |err| switch (err) {
|
||||
error.FileNotFound => return error.MissingDebugInfo,
|
||||
else => return err,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user