aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJay Petacat <jay@jayschwa.net>2021-01-05 20:57:18 -0500
committerAndrew Kelley <andrew@ziglang.org>2021-01-07 23:48:58 -0800
commita9b505fa7774e2e8451bedfa7bea27d7227572e7 (patch)
tree408a88da61e15d5ace79ecefebfe868c09f80d35 /tools
parent8e9a1ac364360b160438af0b96132d5aacf39a71 (diff)
downloadzig-a9b505fa7774e2e8451bedfa7bea27d7227572e7.tar.gz
zig-a9b505fa7774e2e8451bedfa7bea27d7227572e7.zip
Reduce use of deprecated IO types
Related: #4917
Diffstat (limited to 'tools')
-rw-r--r--tools/update_clang_options.zig8
-rw-r--r--tools/update_glibc.zig6
2 files changed, 7 insertions, 7 deletions
diff --git a/tools/update_clang_options.zig b/tools/update_clang_options.zig
index fd64bb062a..ad380e0139 100644
--- a/tools/update_clang_options.zig
+++ b/tools/update_clang_options.zig
@@ -388,8 +388,8 @@ pub fn main() anyerror!void {
// "W" and "Wl,". So we sort this list in order of descending priority.
std.sort.sort(*json.ObjectMap, all_objects.items, {}, objectLessThan);
- var stdout_bos = std.io.bufferedOutStream(std.io.getStdOut().outStream());
- const stdout = stdout_bos.outStream();
+ var buffered_stdout = std.io.bufferedWriter(std.io.getStdOut().writer());
+ const stdout = buffered_stdout.writer();
try stdout.writeAll(
\\// This file is generated by tools/update_clang_options.zig.
\\// zig fmt: off
@@ -469,7 +469,7 @@ pub fn main() anyerror!void {
\\
);
- try stdout_bos.flush();
+ try buffered_stdout.flush();
}
// TODO we should be able to import clang_options.zig but currently this is problematic because it will
@@ -611,7 +611,7 @@ fn objectLessThan(context: void, a: *json.ObjectMap, b: *json.ObjectMap) bool {
}
fn usageAndExit(file: fs.File, arg0: []const u8, code: u8) noreturn {
- file.outStream().print(
+ file.writer().print(
\\Usage: {} /path/to/llvm-tblgen /path/to/git/llvm/llvm-project
\\Alternative Usage: zig run /path/to/git/zig/tools/update_clang_options.zig -- /path/to/llvm-tblgen /path/to/git/llvm/llvm-project
\\
diff --git a/tools/update_glibc.zig b/tools/update_glibc.zig
index 03b746f0ab..1e23bf0ff8 100644
--- a/tools/update_glibc.zig
+++ b/tools/update_glibc.zig
@@ -239,7 +239,7 @@ pub fn main() !void {
const vers_txt_path = try fs.path.join(allocator, &[_][]const u8{ glibc_out_dir, "vers.txt" });
const vers_txt_file = try fs.cwd().createFile(vers_txt_path, .{});
defer vers_txt_file.close();
- var buffered = std.io.bufferedOutStream(vers_txt_file.writer());
+ var buffered = std.io.bufferedWriter(vers_txt_file.writer());
const vers_txt = buffered.writer();
for (global_ver_list) |name, i| {
_ = global_ver_set.put(name, i) catch unreachable;
@@ -251,7 +251,7 @@ pub fn main() !void {
const fns_txt_path = try fs.path.join(allocator, &[_][]const u8{ glibc_out_dir, "fns.txt" });
const fns_txt_file = try fs.cwd().createFile(fns_txt_path, .{});
defer fns_txt_file.close();
- var buffered = std.io.bufferedOutStream(fns_txt_file.writer());
+ var buffered = std.io.bufferedWriter(fns_txt_file.writer());
const fns_txt = buffered.writer();
for (global_fn_list) |name, i| {
const entry = global_fn_set.getEntry(name).?;
@@ -282,7 +282,7 @@ pub fn main() !void {
const abilist_txt_path = try fs.path.join(allocator, &[_][]const u8{ glibc_out_dir, "abi.txt" });
const abilist_txt_file = try fs.cwd().createFile(abilist_txt_path, .{});
defer abilist_txt_file.close();
- var buffered = std.io.bufferedOutStream(abilist_txt_file.writer());
+ var buffered = std.io.bufferedWriter(abilist_txt_file.writer());
const abilist_txt = buffered.writer();
// first iterate over the abi lists