diff options
| author | Jacob Young <jacobly0@users.noreply.github.com> | 2025-01-02 03:10:19 -0500 |
|---|---|---|
| committer | Jacob Young <jacobly0@users.noreply.github.com> | 2025-01-16 20:42:08 -0500 |
| commit | e5d5a8bc4ea6b27dc3540ad4800a1231ff50b33d (patch) | |
| tree | 114481f7bbf4d5e6a4703a7606f654dabb5df330 /lib/std/debug/SelfInfo.zig | |
| parent | ac1a975f9b5a7d939663fa90556a2f038250c531 (diff) | |
| download | zig-e5d5a8bc4ea6b27dc3540ad4800a1231ff50b33d.tar.gz zig-e5d5a8bc4ea6b27dc3540ad4800a1231ff50b33d.zip | |
x86_64: implement switch jump tables
Diffstat (limited to 'lib/std/debug/SelfInfo.zig')
| -rw-r--r-- | lib/std/debug/SelfInfo.zig | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/std/debug/SelfInfo.zig b/lib/std/debug/SelfInfo.zig index 544cf0ac6f..4dd0b4e842 100644 --- a/lib/std/debug/SelfInfo.zig +++ b/lib/std/debug/SelfInfo.zig @@ -121,13 +121,13 @@ pub fn deinit(self: *SelfInfo) void { } pub fn getModuleForAddress(self: *SelfInfo, address: usize) !*Module { - if (comptime builtin.target.isDarwin()) { + if (builtin.target.isDarwin()) { return self.lookupModuleDyld(address); } else if (native_os == .windows) { return self.lookupModuleWin32(address); } else if (native_os == .haiku) { return self.lookupModuleHaiku(address); - } else if (comptime builtin.target.isWasm()) { + } else if (builtin.target.isWasm()) { return self.lookupModuleWasm(address); } else { return self.lookupModuleDl(address); @@ -138,13 +138,13 @@ pub fn getModuleForAddress(self: *SelfInfo, address: usize) !*Module { // This can be called when getModuleForAddress fails, so implementations should provide // a path that doesn't rely on any side-effects of a prior successful module lookup. pub fn getModuleNameForAddress(self: *SelfInfo, address: usize) ?[]const u8 { - if (comptime builtin.target.isDarwin()) { + if (builtin.target.isDarwin()) { return self.lookupModuleNameDyld(address); } else if (native_os == .windows) { return self.lookupModuleNameWin32(address); } else if (native_os == .haiku) { return null; - } else if (comptime builtin.target.isWasm()) { + } else if (builtin.target.isWasm()) { return null; } else { return self.lookupModuleNameDl(address); |
