From f86469bc5eea2b7bd95222d00a11bd287bfdfedf Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Tue, 27 Apr 2021 18:36:12 -0700 Subject: stage2: semaDecl properly analyzes the decl block Also flattened out Decl TypedValue fields into ty, val, has_tv and add relevant fields to Decl for alignment and link section. --- src/link/SpirV.zig | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/link/SpirV.zig') diff --git a/src/link/SpirV.zig b/src/link/SpirV.zig index 5d4e50ef25..09045ac91a 100644 --- a/src/link/SpirV.zig +++ b/src/link/SpirV.zig @@ -179,13 +179,9 @@ pub fn flushModule(self: *SpirV, comp: *Compilation) !void { for (self.decl_table.items()) |entry| { const decl = entry.key; - switch (decl.typed_value) { - .most_recent => |tvm| { - const fn_data = &decl.fn_link.spirv; - all_buffers.appendAssumeCapacity(wordsToIovConst(fn_data.code.items)); - }, - .never_succeeded => continue, - } + if (!decl.has_tv) continue; + const fn_data = &decl.fn_link.spirv; + all_buffers.appendAssumeCapacity(wordsToIovConst(fn_data.code.items)); } var file_size: u64 = 0; -- cgit v1.2.3