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

Fields

default = 0
generaldynamic = 1
localdynamic = 2
initialexec = 3
localexec = 4

Functions

Functionformat[src]

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

Parameters

prefix: []const u8

Source Code

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

Source Code

Source code
pub const ThreadLocal = enum(u3) {
    default = 0,
    generaldynamic = 1,
    localdynamic = 2,
    initialexec = 3,
    localexec = 4,

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