aboutsummaryrefslogtreecommitdiff
path: root/src/codegen
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2025-08-27 21:20:18 -0700
committerAndrew Kelley <andrew@ziglang.org>2025-08-29 17:14:26 -0700
commit79f267f6b9e7f80a6fed3b1019f9de942841c3be (patch)
tree29a243d4aa85d8295cc06608bde59333ebdb843c /src/codegen
parent558bea2a76179fcc00779fdd326e5a866956fc9b (diff)
downloadzig-79f267f6b9e7f80a6fed3b1019f9de942841c3be.tar.gz
zig-79f267f6b9e7f80a6fed3b1019f9de942841c3be.zip
std.Io: delete GenericReader
and delete deprecated alias std.io
Diffstat (limited to 'src/codegen')
-rw-r--r--src/codegen/c.zig20
-rw-r--r--src/codegen/c/Type.zig2
-rw-r--r--src/codegen/llvm.zig2
-rw-r--r--src/codegen/spirv/CodeGen.zig2
-rw-r--r--src/codegen/spirv/spec.zig2
5 files changed, 14 insertions, 14 deletions
diff --git a/src/codegen/c.zig b/src/codegen/c.zig
index b671718351..b2ecac5d10 100644
--- a/src/codegen/c.zig
+++ b/src/codegen/c.zig
@@ -4,7 +4,7 @@ const assert = std.debug.assert;
const mem = std.mem;
const log = std.log.scoped(.c);
const Allocator = mem.Allocator;
-const Writer = std.io.Writer;
+const Writer = std.Io.Writer;
const dev = @import("../dev.zig");
const link = @import("../link.zig");
@@ -345,15 +345,15 @@ fn isReservedIdent(ident: []const u8) bool {
} else return reserved_idents.has(ident);
}
-fn formatIdentSolo(ident: []const u8, w: *std.io.Writer) std.io.Writer.Error!void {
+fn formatIdentSolo(ident: []const u8, w: *Writer) Writer.Error!void {
return formatIdentOptions(ident, w, true);
}
-fn formatIdentUnsolo(ident: []const u8, w: *std.io.Writer) std.io.Writer.Error!void {
+fn formatIdentUnsolo(ident: []const u8, w: *Writer) Writer.Error!void {
return formatIdentOptions(ident, w, false);
}
-fn formatIdentOptions(ident: []const u8, w: *std.io.Writer, solo: bool) std.io.Writer.Error!void {
+fn formatIdentOptions(ident: []const u8, w: *Writer, solo: bool) Writer.Error!void {
if (solo and isReservedIdent(ident)) {
try w.writeAll("zig_e_");
}
@@ -384,7 +384,7 @@ const CTypePoolStringFormatData = struct {
ctype_pool: *const CType.Pool,
solo: bool,
};
-fn formatCTypePoolString(data: CTypePoolStringFormatData, w: *std.io.Writer) std.io.Writer.Error!void {
+fn formatCTypePoolString(data: CTypePoolStringFormatData, w: *Writer) Writer.Error!void {
if (data.ctype_pool_string.toSlice(data.ctype_pool)) |slice|
try formatIdentOptions(slice, w, data.solo)
else
@@ -711,8 +711,8 @@ pub const Function = struct {
/// It is not available when generating .h file.
pub const Object = struct {
dg: DeclGen,
- code_header: std.io.Writer.Allocating,
- code: std.io.Writer.Allocating,
+ code_header: Writer.Allocating,
+ code: Writer.Allocating,
indent_counter: usize,
const indent_width = 1;
@@ -748,7 +748,7 @@ pub const DeclGen = struct {
pass: Pass,
is_naked_fn: bool,
expected_block: ?u32,
- fwd_decl: std.io.Writer.Allocating,
+ fwd_decl: Writer.Allocating,
error_msg: ?*Zcu.ErrorMsg,
ctype_pool: CType.Pool,
scratch: std.ArrayListUnmanaged(u32),
@@ -8287,7 +8287,7 @@ const FormatStringContext = struct {
sentinel: ?u8,
};
-fn formatStringLiteral(data: FormatStringContext, w: *std.io.Writer) std.io.Writer.Error!void {
+fn formatStringLiteral(data: FormatStringContext, w: *Writer) Writer.Error!void {
var literal: StringLiteral = .init(w, data.str.len + @intFromBool(data.sentinel != null));
try literal.start();
for (data.str) |c| try literal.writeChar(c);
@@ -8314,7 +8314,7 @@ const FormatIntLiteralContext = struct {
base: u8,
case: std.fmt.Case,
};
-fn formatIntLiteral(data: FormatIntLiteralContext, w: *std.io.Writer) std.io.Writer.Error!void {
+fn formatIntLiteral(data: FormatIntLiteralContext, w: *Writer) Writer.Error!void {
const pt = data.dg.pt;
const zcu = pt.zcu;
const target = &data.dg.mod.resolved_target.result;
diff --git a/src/codegen/c/Type.zig b/src/codegen/c/Type.zig
index 3e22b8ab7b..d270e1dc9c 100644
--- a/src/codegen/c/Type.zig
+++ b/src/codegen/c/Type.zig
@@ -3396,7 +3396,7 @@ pub const AlignAs = packed struct {
const std = @import("std");
const assert = std.debug.assert;
-const Writer = std.io.Writer;
+const Writer = std.Io.Writer;
const CType = @This();
const InternPool = @import("../../InternPool.zig");
diff --git a/src/codegen/llvm.zig b/src/codegen/llvm.zig
index e4abfcca43..6c0d9236be 100644
--- a/src/codegen/llvm.zig
+++ b/src/codegen/llvm.zig
@@ -2683,7 +2683,7 @@ pub const Object = struct {
}
fn allocTypeName(o: *Object, pt: Zcu.PerThread, ty: Type) Allocator.Error![:0]const u8 {
- var aw: std.io.Writer.Allocating = .init(o.gpa);
+ var aw: std.Io.Writer.Allocating = .init(o.gpa);
defer aw.deinit();
ty.print(&aw.writer, pt) catch |err| switch (err) {
error.WriteFailed => return error.OutOfMemory,
diff --git a/src/codegen/spirv/CodeGen.zig b/src/codegen/spirv/CodeGen.zig
index 0edcfa5919..fe8d3b45e9 100644
--- a/src/codegen/spirv/CodeGen.zig
+++ b/src/codegen/spirv/CodeGen.zig
@@ -1211,7 +1211,7 @@ fn constantNavRef(cg: *CodeGen, ty: Type, nav_index: InternPool.Nav.Index) !Id {
// Turn a Zig type's name into a cache reference.
fn resolveTypeName(cg: *CodeGen, ty: Type) ![]const u8 {
const gpa = cg.module.gpa;
- var aw: std.io.Writer.Allocating = .init(gpa);
+ var aw: std.Io.Writer.Allocating = .init(gpa);
defer aw.deinit();
ty.print(&aw.writer, cg.pt) catch |err| switch (err) {
error.WriteFailed => return error.OutOfMemory,
diff --git a/src/codegen/spirv/spec.zig b/src/codegen/spirv/spec.zig
index 9f91320fdc..df5292e3e2 100644
--- a/src/codegen/spirv/spec.zig
+++ b/src/codegen/spirv/spec.zig
@@ -18,7 +18,7 @@ pub const Id = enum(Word) {
none,
_,
- pub fn format(self: Id, writer: *std.io.Writer) std.io.Writer.Error!void {
+ pub fn format(self: Id, writer: *std.Io.Writer) std.Io.Writer.Error!void {
switch (self) {
.none => try writer.writeAll("(none)"),
else => try writer.print("%{d}", .{@intFromEnum(self)}),