aboutsummaryrefslogtreecommitdiff
path: root/src/link/MachO/UnwindInfo.zig
diff options
context:
space:
mode:
authorJakub Konka <kubkon@jakubkonka.com>2023-08-25 06:47:41 +0200
committerJakub Konka <kubkon@jakubkonka.com>2023-08-29 11:39:34 +0200
commitbf5c35145da5cdaa9290d000728c0b8f307d89df (patch)
treebd07731e1318398119f7dbfc74a89f2ea325882b /src/link/MachO/UnwindInfo.zig
parent4b934b1f78c57598b5c629cff9d9a02c5e2ffe13 (diff)
downloadzig-bf5c35145da5cdaa9290d000728c0b8f307d89df.tar.gz
zig-bf5c35145da5cdaa9290d000728c0b8f307d89df.zip
macho: remove dead code
Diffstat (limited to 'src/link/MachO/UnwindInfo.zig')
-rw-r--r--src/link/MachO/UnwindInfo.zig6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/link/MachO/UnwindInfo.zig b/src/link/MachO/UnwindInfo.zig
index 07a6b49b77..53d7c149be 100644
--- a/src/link/MachO/UnwindInfo.zig
+++ b/src/link/MachO/UnwindInfo.zig
@@ -20,8 +20,6 @@ const Object = @import("Object.zig");
const SymbolWithLoc = MachO.SymbolWithLoc;
const Zld = @import("zld.zig").Zld;
-const N_DEAD = @import("zld.zig").N_DEAD;
-
gpa: Allocator,
/// List of all unwind records gathered from all objects and sorted
@@ -301,7 +299,7 @@ pub fn collect(info: *UnwindInfo, zld: *Zld) !void {
break :blk record;
} else blk: {
const sym = zld.getSymbol(symbol);
- if (sym.n_desc == N_DEAD) continue;
+ if (sym.n_desc == MachO.N_DEAD) continue;
if (prev_symbol) |prev_sym| {
const prev_addr = object.getSourceSymbol(prev_sym.sym_index).?.n_value;
const curr_addr = object.getSourceSymbol(symbol.sym_index).?.n_value;
@@ -327,7 +325,7 @@ pub fn collect(info: *UnwindInfo, zld: *Zld) !void {
const atom = zld.getAtom(atom_index);
const sym = zld.getSymbol(symbol);
- assert(sym.n_desc != N_DEAD);
+ assert(sym.n_desc != MachO.N_DEAD);
const size = if (inner_syms_it.next()) |next_sym| blk: {
// All this trouble to account for symbol aliases.
// TODO I think that remodelling the linker so that a Symbol references an Atom