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) {
20372037
20382038 pub fn format(p: Prefixed, w: *Writer) Writer.Error!void {
20392039 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 });
20412041 }
20422042 };
20432043
......@@ -2384,7 +2384,7 @@ pub const Global = struct {
23842384 };
23852385 fn format(data: FormatData, w: *Writer) Writer.Error!void {
23862386 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),
23882388 });
23892389 }
23902390 pub fn fmt(self: Index, builder: *const Builder) std.fmt.Formatter(FormatData, format) {
......@@ -8401,7 +8401,7 @@ pub const Metadata = enum(u32) {
84018401 }, w);
84028402 },
84038403 .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),
84058405 }),
84068406 inline .bool, .u32, .u64 => |node| try w.print("{}", .{node}),
84078407 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
97829782 instruction_index.name(&function).fmt(self),
97839783 @tagName(tag),
97849784 extra.lhs.fmt(function_index, self, .{ .percent = true }),
9785 extra.rhs.fmt(function_index, self, .{ .percent = true }),
9785 extra.rhs.fmt(function_index, self, .{}),
97869786 });
97879787 },
97889788 .addrspacecast,