enumstd.zig.llvm.Builder.Attribute.Kind[src]

Fields

zeroext = 34
signext = 24
inreg = 5
byval = 3
byref = 69
preallocated = 65
inalloca = 38
sret = 29
elementtype = 77
@"align" = 1
@"noalias" = 9
nocapture = 11
nofree = 62
nest = 8
returned = 22
nonnull = 39
dereferenceable = 41
dereferenceable_or_null = 42
swiftself = 46
swiftasync = 75
swifterror = 47
immarg = 60
noundef = 68
nofpclass = 87
alignstack = 25
allocalign = 80
allocptr = 81
readnone = 20
readonly = 21
writeonly = 52
allockind = 82
allocsize = 51
alwaysinline = 2
builtin = 35
cold = 36
convergent = 43
disable_sanitizer_information = 78
fn_ret_thunk_extern = 84
hot = 72
inlinehint = 4
jumptable = 40
memory = 86
minsize = 6
naked = 7
nobuiltin = 10
nocallback = 71
noduplicate = 12
noimplicitfloat = 13
@"noinline" = 14
nomerge = 66
nonlazybind = 15
noprofile = 73
skipprofile = 85
noredzone = 16
noreturn = 17
norecurse = 48
willreturn = 61
nosync = 63
nounwind = 18
nosanitize_bounds = 79
nosanitize_coverage = 76
null_pointer_is_valid = 67
optforfuzzing = 57
optnone = 37
optsize = 19
returns_twice = 23
safestack = 44
sanitize_address = 30
sanitize_memory = 32
sanitize_thread = 31
sanitize_hwaddress = 55
sanitize_memtag = 64
speculative_load_hardening = 59
speculatable = 53
ssp = 26
sspstrong = 28
sspreq = 27
strictfp = 54
uwtable = 33
nocf_check = 56
shadowcallstack = 58
mustprogress = 70
vscale_range = 74
no_sanitize_address = 100
no_sanitize_hwaddress = 101
sanitize_address_dyninit = 102
string = std.math.maxInt(u31)
none = std.math.maxInt(u32)
_

Values

Constantlen[src]

Source Code

Source code
pub const len = @typeInfo(Kind).@"enum".fields.len - 2

Functions

FunctionfromString[src]

pub fn fromString(str: String) Kind

Parameters

str: String

Source Code

Source code
pub fn fromString(str: String) Kind {
    assert(!str.isAnon());
    const kind: Kind = @enumFromInt(@intFromEnum(str));
    assert(kind != .none);
    return kind;
}

Source Code

Source code
pub const Kind = enum(u32) {
    // Parameter Attributes
    zeroext = 34,
    signext = 24,
    inreg = 5,
    byval = 3,
    byref = 69,
    preallocated = 65,
    inalloca = 38,
    sret = 29, // TODO: ?
    elementtype = 77,
    @"align" = 1,
    @"noalias" = 9,
    nocapture = 11,
    nofree = 62,
    nest = 8,
    returned = 22,
    nonnull = 39,
    dereferenceable = 41,
    dereferenceable_or_null = 42,
    swiftself = 46,
    swiftasync = 75,
    swifterror = 47,
    immarg = 60,
    noundef = 68,
    nofpclass = 87,
    alignstack = 25,
    allocalign = 80,
    allocptr = 81,
    readnone = 20,
    readonly = 21,
    writeonly = 52,

    // Function Attributes
    //alignstack,
    allockind = 82,
    allocsize = 51,
    alwaysinline = 2,
    builtin = 35,
    cold = 36,
    convergent = 43,
    disable_sanitizer_information = 78,
    fn_ret_thunk_extern = 84,
    hot = 72,
    inlinehint = 4,
    jumptable = 40,
    memory = 86,
    minsize = 6,
    naked = 7,
    nobuiltin = 10,
    nocallback = 71,
    noduplicate = 12,
    //nofree,
    noimplicitfloat = 13,
    @"noinline" = 14,
    nomerge = 66,
    nonlazybind = 15,
    noprofile = 73,
    skipprofile = 85,
    noredzone = 16,
    noreturn = 17,
    norecurse = 48,
    willreturn = 61,
    nosync = 63,
    nounwind = 18,
    nosanitize_bounds = 79,
    nosanitize_coverage = 76,
    null_pointer_is_valid = 67,
    optforfuzzing = 57,
    optnone = 37,
    optsize = 19,
    //preallocated,
    returns_twice = 23,
    safestack = 44,
    sanitize_address = 30,
    sanitize_memory = 32,
    sanitize_thread = 31,
    sanitize_hwaddress = 55,
    sanitize_memtag = 64,
    speculative_load_hardening = 59,
    speculatable = 53,
    ssp = 26,
    sspstrong = 28,
    sspreq = 27,
    strictfp = 54,
    uwtable = 33,
    nocf_check = 56,
    shadowcallstack = 58,
    mustprogress = 70,
    vscale_range = 74,

    // Global Attributes
    no_sanitize_address = 100,
    no_sanitize_hwaddress = 101,
    //sanitize_memtag,
    sanitize_address_dyninit = 102,

    string = std.math.maxInt(u31),
    none = std.math.maxInt(u32),
    _,

    pub const len = @typeInfo(Kind).@"enum".fields.len - 2;

    pub fn fromString(str: String) Kind {
        assert(!str.isAnon());
        const kind: Kind = @enumFromInt(@intFromEnum(str));
        assert(kind != .none);
        return kind;
    }

    fn toString(self: Kind) ?String {
        assert(self != .none);
        const str: String = @enumFromInt(@intFromEnum(self));
        return if (str.isAnon()) null else str;
    }
}