diff options
| author | Veikka Tuominen <git@vexu.eu> | 2022-08-21 17:24:04 +0300 |
|---|---|---|
| committer | Veikka Tuominen <git@vexu.eu> | 2022-08-22 11:19:20 +0300 |
| commit | 62ff8871ed9c8c4e46d8acd1d227ed3fb802be7f (patch) | |
| tree | b5bdd3f092ebc0b7e9c260df798b7019f69cdae7 /tools | |
| parent | 6c020cdb767192757b6c4b43e2f14c5394760431 (diff) | |
| download | zig-62ff8871ed9c8c4e46d8acd1d227ed3fb802be7f.tar.gz zig-62ff8871ed9c8c4e46d8acd1d227ed3fb802be7f.zip | |
stage2+stage1: remove type parameter from bit builtins
Closes #12529
Closes #12511
Closes #6835
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/gen_spirv_spec.zig | 4 | ||||
| -rw-r--r-- | tools/gen_stubs.zig | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tools/gen_spirv_spec.zig b/tools/gen_spirv_spec.zig index 01c36ad72d..11ccce35a2 100644 --- a/tools/gen_spirv_spec.zig +++ b/tools/gen_spirv_spec.zig @@ -299,11 +299,11 @@ fn renderBitEnum( for (enumerants) |enumerant, i| { if (enumerant.value != .bitflag) return error.InvalidRegistry; const value = try parseHexInt(enumerant.value.bitflag); - if (@popCount(u32, value) == 0) { + if (@popCount(value) == 0) { continue; // Skip 'none' items } - std.debug.assert(@popCount(u32, value) == 1); + std.debug.assert(@popCount(value) == 1); var bitpos = std.math.log2_int(u32, value); if (flags_by_bitpos[bitpos]) |*existing| { diff --git a/tools/gen_stubs.zig b/tools/gen_stubs.zig index a153d0f2eb..b7c1ae1647 100644 --- a/tools/gen_stubs.zig +++ b/tools/gen_stubs.zig @@ -389,7 +389,7 @@ fn parseElf(parse: Parse, comptime is_64: bool, comptime endian: builtin.Endian) const S = struct { fn endianSwap(x: anytype) @TypeOf(x) { if (endian != native_endian) { - return @byteSwap(@TypeOf(x), x); + return @byteSwap(x); } else { return x; } |
