aboutsummaryrefslogtreecommitdiff
path: root/src/Module.zig
diff options
context:
space:
mode:
authorJakub Konka <kubkon@jakubkonka.com>2023-02-01 16:01:43 +0100
committerJakub Konka <kubkon@jakubkonka.com>2023-02-01 16:01:43 +0100
commite0f3975fc8a7afd8a613802321fd46e64d8970d5 (patch)
tree4dabff13e809b7cdc4f460410762e93d372349a0 /src/Module.zig
parent5de2aae63cd75322e58204a6be8df49754e4851a (diff)
downloadzig-e0f3975fc8a7afd8a613802321fd46e64d8970d5.tar.gz
zig-e0f3975fc8a7afd8a613802321fd46e64d8970d5.zip
link: make SpirV atoms fully owned by the linker
Diffstat (limited to 'src/Module.zig')
-rw-r--r--src/Module.zig19
1 files changed, 3 insertions, 16 deletions
diff --git a/src/Module.zig b/src/Module.zig
index eb947a6977..bfeeea51e8 100644
--- a/src/Module.zig
+++ b/src/Module.zig
@@ -5183,20 +5183,7 @@ fn scanDecl(iter: *ScanDeclIter, decl_sub_index: usize, flags: u4) Allocator.Err
decl.zir_decl_index = @intCast(u32, decl_sub_index);
if (decl.getFunction()) |_| {
switch (comp.bin_file.tag) {
- .coff => {
- // TODO Implement for COFF
- },
- .elf => {
- // TODO Look into detecting when this would be unnecessary by storing enough state
- // in `Decl` to notice that the line number did not change.
- comp.work_queue.writeItemAssumeCapacity(.{ .update_line_number = decl_index });
- },
- .macho => {
- // TODO Look into detecting when this would be unnecessary by storing enough state
- // in `Decl` to notice that the line number did not change.
- comp.work_queue.writeItemAssumeCapacity(.{ .update_line_number = decl_index });
- },
- .plan9 => {
+ .coff, .elf, .macho, .plan9 => {
// TODO Look into detecting when this would be unnecessary by storing enough state
// in `Decl` to notice that the line number did not change.
comp.work_queue.writeItemAssumeCapacity(.{ .update_line_number = decl_index });
@@ -5290,7 +5277,7 @@ pub fn clearDecl(
.plan9 => .{ .plan9 = {} },
.c => .{ .c = {} },
.wasm => .{ .wasm = link.File.Wasm.FnData.empty },
- .spirv => .{ .spirv = .{} },
+ .spirv => .{ .spirv = {} },
.nvptx => .{ .nvptx = {} },
};
}
@@ -5710,7 +5697,7 @@ pub fn allocateNewDecl(
.plan9 => .{ .plan9 = {} },
.c => .{ .c = {} },
.wasm => .{ .wasm = link.File.Wasm.FnData.empty },
- .spirv => .{ .spirv = .{} },
+ .spirv => .{ .spirv = {} },
.nvptx => .{ .nvptx = {} },
},
.generation = 0,