aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJakub Konka <kubkon@jakubkonka.com>2021-01-18 20:26:06 +0100
committerJakub Konka <kubkon@jakubkonka.com>2021-01-18 22:26:23 +0100
commita2ebe3c82c89084a3672593cb34f259fca5a5e30 (patch)
treeb98fa57087156c610c9769ce29cea0c1ae62e300 /src
parente32131cfae60859340ea43893fa1d0f70701ec31 (diff)
downloadzig-a2ebe3c82c89084a3672593cb34f259fca5a5e30.tar.gz
zig-a2ebe3c82c89084a3672593cb34f259fca5a5e30.zip
macho: add missing DWARF line no update in codegen
Diffstat (limited to 'src')
-rw-r--r--src/Module.zig6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Module.zig b/src/Module.zig
index d75c1d2a0d..42b3fff0f0 100644
--- a/src/Module.zig
+++ b/src/Module.zig
@@ -1617,8 +1617,10 @@ pub fn analyzeContainer(self: *Module, container_scope: *Scope.Container) !void
// in `Decl` to notice that the line number did not change.
self.comp.work_queue.writeItemAssumeCapacity(.{ .update_line_number = decl });
},
- .macho => {
- // TODO Implement for MachO
+ .macho => if (decl.fn_link.macho.len != 0) {
+ // TODO Look into detecting when this would be unnecessary by storing enough state
+ // in `Decl` to notice that the line number did not change.
+ self.comp.work_queue.writeItemAssumeCapacity(.{ .update_line_number = decl });
},
.c, .wasm => {},
}