addFunction
Function parameters
Parameters
- self:*Builder
Type definitions in this namespace
Types
Functions in this namespace
Functions
= 16
Values
Source
Implementation
pub fn addFunction(
self: *Builder,
ty: Type,
name: StrtabString,
addr_space: AddrSpace,
) Allocator.Error!Function.Index {
assert(!name.isAnon());
try self.ensureUnusedTypeCapacity(1, NoExtra, 0);
try self.ensureUnusedGlobalCapacity(name);
try self.functions.ensureUnusedCapacity(self.gpa, 1);
return self.addFunctionAssumeCapacity(ty, name, addr_space);
}