aboutsummaryrefslogtreecommitdiff
path: root/src/link/SpirV.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2021-04-27 18:36:12 -0700
committerAndrew Kelley <andrew@ziglang.org>2021-04-28 16:57:01 -0700
commitf86469bc5eea2b7bd95222d00a11bd287bfdfedf (patch)
treec34ef71820e4c7b962a631f2b9cdecdff3f5aa79 /src/link/SpirV.zig
parentfa6bb4b662155e4d6a61cc551b5d02a2a7d5d144 (diff)
downloadzig-f86469bc5eea2b7bd95222d00a11bd287bfdfedf.tar.gz
zig-f86469bc5eea2b7bd95222d00a11bd287bfdfedf.zip
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.
Diffstat (limited to 'src/link/SpirV.zig')
-rw-r--r--src/link/SpirV.zig10
1 files changed, 3 insertions, 7 deletions
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;