From e0f3975fc8a7afd8a613802321fd46e64d8970d5 Mon Sep 17 00:00:00 2001 From: Jakub Konka Date: Wed, 1 Feb 2023 16:01:43 +0100 Subject: link: make SpirV atoms fully owned by the linker --- src/Module.zig | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) (limited to 'src/Module.zig') 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, -- cgit v1.2.3