pub fn fnAttrs(self: *Builder, fn_attributes: []const Attributes) Allocator.Error!FunctionAttributes self: *Builderfn_attributes: []const Attributes10213
10214
10215
10216
10217
10218
10219
10220
10221
10222
10223
10224pub fn fnAttrs(self: *Builder, fn_attributes: []const Attributes) Allocator.Error!FunctionAttributes {
try self.function_attributes_set.ensureUnusedCapacity(self.gpa, 1);
const function_attributes: FunctionAttributes = @fromBackingInt(try self.attrGeneric(@ptrCast(
fn_attributes[0..if (std.mem.findLastNone(Attributes, fn_attributes, &.{.none})) |last|
last + 1
else
0],
)));
_ = self.function_attributes_set.getOrPutAssumeCapacity(function_attributes);
return function_attributes;
}