enumstd.zig.llvm.Builder.SyncScope[src]

Fields

singlethread
system

Functions

Functionformat[src]

pub fn format( self: SyncScope, comptime prefix: []const u8, _: std.fmt.FormatOptions, writer: anytype, ) @TypeOf(writer).Error!void

Parameters

self: SyncScope
prefix: []const u8

Source Code

Source code
pub fn format(
    self: SyncScope,
    comptime prefix: []const u8,
    _: std.fmt.FormatOptions,
    writer: anytype,
) @TypeOf(writer).Error!void {
    if (self != .system) try writer.print(
        \\{s}syncscope("{s}")
    , .{ prefix, @tagName(self) });
}

Source Code

Source code
pub const SyncScope = enum(u1) {
    singlethread,
    system,

    pub fn format(
        self: SyncScope,
        comptime prefix: []const u8,
        _: std.fmt.FormatOptions,
        writer: anytype,
    ) @TypeOf(writer).Error!void {
        if (self != .system) try writer.print(
            \\{s}syncscope("{s}")
        , .{ prefix, @tagName(self) });
    }
}