diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2024-03-25 16:32:18 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-25 16:32:18 -0700 |
| commit | 405502286d28baee4dc3a6152282d1e6fe6c6472 (patch) | |
| tree | 679088dc9e31d849582989a572a8685d9d7f2492 /src/codegen/c.zig | |
| parent | abadad464090a897813e35539d669f707ea3a8b4 (diff) | |
| parent | f8b8259e5caf30bd87151a0dcad7867768930e6b (diff) | |
| download | zig-405502286d28baee4dc3a6152282d1e6fe6c6472.tar.gz zig-405502286d28baee4dc3a6152282d1e6fe6c6472.zip | |
Merge pull request #19414 from mlugg/comptime-mutable-memory-yet-again
compiler: implement analysis-local comptime-mutable memory
Diffstat (limited to 'src/codegen/c.zig')
| -rw-r--r-- | src/codegen/c.zig | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/codegen/c.zig b/src/codegen/c.zig index 10795529f9..9b856de111 100644 --- a/src/codegen/c.zig +++ b/src/codegen/c.zig @@ -698,7 +698,6 @@ pub const DeclGen = struct { const ptr = mod.intern_pool.indexToKey(ptr_val).ptr; switch (ptr.addr) { .decl => |d| try dg.renderDeclValue(writer, ptr_ty, Value.fromInterned(ptr_val), d, location), - .mut_decl => |md| try dg.renderDeclValue(writer, ptr_ty, Value.fromInterned(ptr_val), md.decl, location), .anon_decl => |anon_decl| try dg.renderAnonDeclValue(writer, ptr_ty, Value.fromInterned(ptr_val), anon_decl, location), .int => |int| { try writer.writeByte('('); @@ -795,7 +794,7 @@ pub const DeclGen = struct { }, } }, - .comptime_field => unreachable, + .comptime_field, .comptime_alloc => unreachable, } } @@ -1229,7 +1228,6 @@ pub const DeclGen = struct { }, .ptr => |ptr| switch (ptr.addr) { .decl => |d| try dg.renderDeclValue(writer, ty, val, d, location), - .mut_decl => |md| try dg.renderDeclValue(writer, ty, val, md.decl, location), .anon_decl => |decl_val| try dg.renderAnonDeclValue(writer, ty, val, decl_val, location), .int => |int| { try writer.writeAll("(("); @@ -1243,7 +1241,7 @@ pub const DeclGen = struct { .elem, .field, => try dg.renderParentPtr(writer, val.ip_index, location), - .comptime_field => unreachable, + .comptime_field, .comptime_alloc => unreachable, }, .opt => |opt| { const payload_ty = ty.optionalChild(mod); |
