authorgravatar for pentuppup@noreply.codeberg.orgpentuppup <pentuppup@noreply.codeberg.org> 2026-05-01 19:29:07-04:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-05-07 05:37:23+02:00
log6d98649f68cd369376020733a691db5c4324130a
tree6e10df389bc1d663bbbedd2bd8a783e8762e63b1
parente445c0d63e788fba46a41c1241e6b312423b7f21

llvm: print linksection when formatting IR


1 files changed, 12 insertions(+), 2 deletions(-)

lib/std/zig/llvm/Builder.zig+12-2
......@@ -9718,8 +9718,7 @@ pub fn print(self: *Builder, w: *Writer) (Writer.Error || Allocator.Error)!void
97189718 metadata_formatter.need_comma = true;
97199719 defer metadata_formatter.need_comma = undefined;
97209720 try w.print(
9721 \\{f} ={f}{f}{f}{f}{f}{f}{f}{f} {s} {f}{f}{f}{f}
9722 \\
9721 \\{f} ={f}{f}{f}{f}{f}{f}{f}{f} {s} {f}{f}
97239722 , .{
97249723 variable.global.fmt(self),
97259724 Linkage.fmtOptional(
......@@ -9735,6 +9734,14 @@ pub fn print(self: *Builder, w: *Writer) (Writer.Error || Allocator.Error)!void
97359734 @tagName(variable.mutability),
97369735 global.type.fmt(self, .percent),
97379736 variable.init.fmt(self, .{ .space = true }),
9737 });
9738 if (variable.section != .none) {
9739 try w.print(", section {f}", .{variable.section.fmtQ(self)});
9740 }
9741 try w.print(
9742 \\{f}{f}
9743 \\
9744 , .{
97389745 variable.alignment.fmt(", "),
97399746 try metadata_formatter.fmt("!dbg ", global.dbg, null),
97409747 });
......@@ -9828,6 +9835,9 @@ pub fn print(self: *Builder, w: *Writer) (Writer.Error || Allocator.Error)!void
98289835 {
98299836 metadata_formatter.need_comma = false;
98309837 defer metadata_formatter.need_comma = undefined;
9838 if (function.section != .none) {
9839 try w.print(" section {f}", .{function.section.fmtQ(self)});
9840 }
98319841 try w.print("{f}{f}", .{
98329842 function.alignment.fmt(" "),
98339843 try metadata_formatter.fmt(" !dbg ", global.dbg, null),