authorgravatar for 51252236+xdBronch@users.noreply.github.comxdBronch <51252236+xdBronch@users.noreply.github.com> 2025-07-10 09:16:54-04:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-07-14 08:31:54+02:00
log5a8acc91158e84d1478478cbf6aa510091708b93
treefb2fc0be140af2ed34fc485155b092c5292f1e44
parente8a4e47d384ab059c856fc99755f5e176bab67d2

fix some llvm ir printer bugs


1 files changed, 4 insertions(+), 4 deletions(-)

lib/std/zig/llvm/Builder.zig+4-4
...@@ -2037,7 +2037,7 @@ pub const Alignment = enum(u6) {...@@ -2037,7 +2037,7 @@ pub const Alignment = enum(u6) {
20372037
2038 pub fn format(p: Prefixed, w: *Writer) Writer.Error!void {2038 pub fn format(p: Prefixed, w: *Writer) Writer.Error!void {
2039 const byte_units = p.alignment.toByteUnits() orelse return;2039 const byte_units = p.alignment.toByteUnits() orelse return;
2040 return w.print("{s}align ({d})", .{ p.prefix, byte_units });2040 return w.print("{s}align {d}", .{ p.prefix, byte_units });
2041 }2041 }
2042 };2042 };
20432043
...@@ -2384,7 +2384,7 @@ pub const Global = struct {...@@ -2384,7 +2384,7 @@ pub const Global = struct {
2384 };2384 };
2385 fn format(data: FormatData, w: *Writer) Writer.Error!void {2385 fn format(data: FormatData, w: *Writer) Writer.Error!void {
2386 try w.print("@{f}", .{2386 try w.print("@{f}", .{
2387 data.global.unwrap(data.builder).name(data.builder).fmt(data.builder, null),2387 data.global.unwrap(data.builder).name(data.builder).fmt(data.builder, .quote_unless_valid_identifier),
2388 });2388 });
2389 }2389 }
2390 pub fn fmt(self: Index, builder: *const Builder) std.fmt.Formatter(FormatData, format) {2390 pub fn fmt(self: Index, builder: *const Builder) std.fmt.Formatter(FormatData, format) {
...@@ -8401,7 +8401,7 @@ pub const Metadata = enum(u32) {...@@ -8401,7 +8401,7 @@ pub const Metadata = enum(u32) {
8401 }, w);8401 }, w);
8402 },8402 },
8403 .string => |node| try w.print("{s}{f}", .{8403 .string => |node| try w.print("{s}{f}", .{
8404 @as([]const u8, if (is_specialized) "" else "!"), node.fmt(builder),8404 @as([]const u8, if (is_specialized) "!" else ""), node.fmt(builder),
8405 }),8405 }),
8406 inline .bool, .u32, .u64 => |node| try w.print("{}", .{node}),8406 inline .bool, .u32, .u64 => |node| try w.print("{}", .{node}),
8407 inline .di_flags, .sp_flags => |node| try w.print("{f}", .{node}),8407 inline .di_flags, .sp_flags => |node| try w.print("{f}", .{node}),
...@@ -9782,7 +9782,7 @@ pub fn print(self: *Builder, w: *Writer) (Writer.Error || Allocator.Error)!void...@@ -9782,7 +9782,7 @@ pub fn print(self: *Builder, w: *Writer) (Writer.Error || Allocator.Error)!void
9782 instruction_index.name(&function).fmt(self),9782 instruction_index.name(&function).fmt(self),
9783 @tagName(tag),9783 @tagName(tag),
9784 extra.lhs.fmt(function_index, self, .{ .percent = true }),9784 extra.lhs.fmt(function_index, self, .{ .percent = true }),
9785 extra.rhs.fmt(function_index, self, .{ .percent = true }),9785 extra.rhs.fmt(function_index, self, .{}),
9786 });9786 });
9787 },9787 },
9788 .addrspacecast,9788 .addrspacecast,