Zig 0.17.0-dev (Split by item) This is an example of documentation generated by
ZigDoc , an alternative to Zig's built-in
Auto Doc feature. See also
examples in other modes/formats . The project being documented here (as the example) is the Zig standard library.
std › zig › llvm › Builder › WipFunction › callMemSet Public Function callMemSet Doc Source 7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379 pub fn callMemSet (
self : *WipFunction ,
dst : Value ,
dst_align : Alignment ,
val : Value ,
len : Value ,
kind : MemoryAccessKind ,
@"inline" : bool ,
) Allocator .Error !Instruction .Index {
var dst_attrs = [_ ]Attribute .Index {try self .builder .attr (.{ .@"align" = .wrap (dst_align ) })};
const value = try self .callIntrinsic (
.normal ,
try self .builder .fnAttrs (&.{ .none , .none , try self .builder .attrs (&dst_attrs ) }),
if (@"inline" ) .@"memset.inline" else .memset ,
&.{ dst .typeOfWip (self ), len .typeOfWip (self ) },
&.{ dst , val , len , switch (kind ) {
.normal => Value .false ,
.@"volatile" => Value .true ,
} },
undefined ,
);
return value .unwrap ().instruction ;
}