mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-04-26 13:01:34 +03:00
zig reduce: fix compilation (#31930)
fixes #31926 Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31930 Reviewed-by: Andrew Kelley <andrew@ziglang.org>
This commit is contained in:
@@ -6,9 +6,9 @@ const BuiltinFn = std.zig.BuiltinFn;
|
||||
|
||||
ast: *const Ast,
|
||||
transformations: *std.array_list.Managed(Transformation),
|
||||
unreferenced_globals: std.StringArrayHashMapUnmanaged(Ast.Node.Index),
|
||||
in_scope_names: std.StringArrayHashMapUnmanaged(u32),
|
||||
replace_names: std.StringArrayHashMapUnmanaged(u32),
|
||||
unreferenced_globals: std.array_hash_map.String(Ast.Node.Index),
|
||||
in_scope_names: std.array_hash_map.String(u32),
|
||||
replace_names: std.array_hash_map.String(u32),
|
||||
gpa: std.mem.Allocator,
|
||||
arena: std.mem.Allocator,
|
||||
|
||||
@@ -63,9 +63,9 @@ pub fn findTransformations(
|
||||
.transformations = transformations,
|
||||
.gpa = transformations.allocator,
|
||||
.arena = arena,
|
||||
.unreferenced_globals = .{},
|
||||
.in_scope_names = .{},
|
||||
.replace_names = .{},
|
||||
.unreferenced_globals = .empty,
|
||||
.in_scope_names = .empty,
|
||||
.replace_names = .empty,
|
||||
};
|
||||
defer {
|
||||
walk.unreferenced_globals.deinit(walk.gpa);
|
||||
@@ -607,7 +607,7 @@ fn walkBlock(
|
||||
{
|
||||
try w.transformations.append(.{ .delete_var_decl = .{
|
||||
.var_decl_node = stmt,
|
||||
.references = .{},
|
||||
.references = .empty,
|
||||
} });
|
||||
const name_tok = var_decl.ast.mut_token + 1;
|
||||
const name_bytes = ast.tokenSlice(name_tok);
|
||||
|
||||
Reference in New Issue
Block a user