diff options
| author | Linus Groh <mail@linusgroh.de> | 2024-09-02 22:32:21 +0100 |
|---|---|---|
| committer | Linus Groh <mail@linusgroh.de> | 2024-09-12 16:01:23 +0100 |
| commit | 8588964972acc473c09e21958a7e52247c978603 (patch) | |
| tree | fb5e35e76e63b6d4aabdb0edf678d4d986a56110 /src/codegen/c.zig | |
| parent | eccd06f5d01d05286691bc77e6d1e582bb14b7b1 (diff) | |
| download | zig-8588964972acc473c09e21958a7e52247c978603.tar.gz zig-8588964972acc473c09e21958a7e52247c978603.zip | |
Replace deprecated default initializations with decl literals
Diffstat (limited to 'src/codegen/c.zig')
| -rw-r--r-- | src/codegen/c.zig | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/codegen/c.zig b/src/codegen/c.zig index 0ec5513b6f..466bdcde6a 100644 --- a/src/codegen/c.zig +++ b/src/codegen/c.zig @@ -304,14 +304,14 @@ pub const Function = struct { air: Air, liveness: Liveness, value_map: CValueMap, - blocks: std.AutoHashMapUnmanaged(Air.Inst.Index, BlockData) = .{}, + blocks: std.AutoHashMapUnmanaged(Air.Inst.Index, BlockData) = .empty, next_arg_index: usize = 0, next_block_index: usize = 0, object: Object, lazy_fns: LazyFnMap, func_index: InternPool.Index, /// All the locals, to be emitted at the top of the function. - locals: std.ArrayListUnmanaged(Local) = .{}, + locals: std.ArrayListUnmanaged(Local) = .empty, /// Which locals are available for reuse, based on Type. free_locals_map: LocalsMap = .{}, /// Locals which will not be freed by Liveness. This is used after a @@ -320,10 +320,10 @@ pub const Function = struct { /// of variable declarations at the top of a function, sorted descending /// by type alignment. /// The value is whether the alloc needs to be emitted in the header. - allocs: std.AutoArrayHashMapUnmanaged(LocalIndex, bool) = .{}, + allocs: std.AutoArrayHashMapUnmanaged(LocalIndex, bool) = .empty, /// Maps from `loop_switch_br` instructions to the allocated local used /// for the switch cond. Dispatches should set this local to the new cond. - loop_switch_conds: std.AutoHashMapUnmanaged(Air.Inst.Index, LocalIndex) = .{}, + loop_switch_conds: std.AutoHashMapUnmanaged(Air.Inst.Index, LocalIndex) = .empty, fn resolveInst(f: *Function, ref: Air.Inst.Ref) !CValue { const gop = try f.value_map.getOrPut(ref); |
