From 902df103c6151c257c90de9ba5f29f7f4b9dbea2 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Tue, 30 Nov 2021 00:13:07 -0700 Subject: std lib API deprecations for the upcoming 0.9.0 release See #3811 --- tools/process_headers.zig | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'tools/process_headers.zig') diff --git a/tools/process_headers.zig b/tools/process_headers.zig index a4a25445ff..fa5fdb0042 100644 --- a/tools/process_headers.zig +++ b/tools/process_headers.zig @@ -295,7 +295,7 @@ pub fn main() !void { if (std.mem.eql(u8, args[arg_i], "--help")) usageAndExit(args[0]); if (arg_i + 1 >= args.len) { - std.debug.warn("expected argument after '{s}'\n", .{args[arg_i]}); + std.debug.print("expected argument after '{s}'\n", .{args[arg_i]}); usageAndExit(args[0]); } @@ -308,7 +308,7 @@ pub fn main() !void { assert(opt_abi == null); opt_abi = args[arg_i + 1]; } else { - std.debug.warn("unrecognized argument: {s}\n", .{args[arg_i]}); + std.debug.print("unrecognized argument: {s}\n", .{args[arg_i]}); usageAndExit(args[0]); } @@ -322,7 +322,7 @@ pub fn main() !void { else if (std.mem.eql(u8, abi_name, "glibc")) LibCVendor.glibc else { - std.debug.warn("unrecognized C ABI: {s}\n", .{abi_name}); + std.debug.print("unrecognized C ABI: {s}\n", .{abi_name}); usageAndExit(args[0]); }; const generic_name = try std.fmt.allocPrint(allocator, "generic-{s}", .{abi_name}); @@ -393,7 +393,7 @@ pub fn main() !void { if (gop.found_existing) { max_bytes_saved += raw_bytes.len; gop.value_ptr.hit_count += 1; - std.debug.warn("duplicate: {s} {s} ({:2})\n", .{ + std.debug.print("duplicate: {s} {s} ({:2})\n", .{ libc_target.name, rel_path, std.fmt.fmtIntSizeDec(raw_bytes.len), @@ -415,16 +415,16 @@ pub fn main() !void { }; try target_to_hash.putNoClobber(dest_target, hash); }, - else => std.debug.warn("warning: weird file: {s}\n", .{full_path}), + else => std.debug.print("warning: weird file: {s}\n", .{full_path}), } } } break; } else { - std.debug.warn("warning: libc target not found: {s}\n", .{libc_target.name}); + std.debug.print("warning: libc target not found: {s}\n", .{libc_target.name}); } } - std.debug.warn("summary: {:2} could be reduced to {:2}\n", .{ + std.debug.print("summary: {:2} could be reduced to {:2}\n", .{ std.fmt.fmtIntSizeDec(total_bytes), std.fmt.fmtIntSizeDec(total_bytes - max_bytes_saved), }); @@ -456,7 +456,7 @@ pub fn main() !void { if (contender.hit_count > 1) { const this_missed_bytes = contender.hit_count * contender.bytes.len; missed_opportunity_bytes += this_missed_bytes; - std.debug.warn("Missed opportunity ({:2}): {s}\n", .{ + std.debug.print("Missed opportunity ({:2}): {s}\n", .{ std.fmt.fmtIntSizeDec(this_missed_bytes), path_kv.key_ptr.*, }); @@ -486,10 +486,10 @@ pub fn main() !void { } fn usageAndExit(arg0: []const u8) noreturn { - std.debug.warn("Usage: {s} [--search-path ] --out --abi \n", .{arg0}); - std.debug.warn("--search-path can be used any number of times.\n", .{}); - std.debug.warn(" subdirectories of search paths look like, e.g. x86_64-linux-gnu\n", .{}); - std.debug.warn("--out is a dir that will be created, and populated with the results\n", .{}); - std.debug.warn("--abi is either musl or glibc\n", .{}); + std.debug.print("Usage: {s} [--search-path ] --out --abi \n", .{arg0}); + std.debug.print("--search-path can be used any number of times.\n", .{}); + std.debug.print(" subdirectories of search paths look like, e.g. x86_64-linux-gnu\n", .{}); + std.debug.print("--out is a dir that will be created, and populated with the results\n", .{}); + std.debug.print("--abi is either musl or glibc\n", .{}); std.process.exit(1); } -- cgit v1.2.3