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 › callMemCpy Public Function callMemCpy Doc Source 7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325 pub fn callMemCpy (
self : *WipFunction ,
dst : Value ,
dst_align : Alignment ,
src : Value ,
src_align : Alignment ,
len : Value ,
kind : MemoryAccessKind ,
@"inline" : bool ,
) Allocator .Error !Instruction .Index {
var dst_attrs = [_ ]Attribute .Index {try self .builder .attr (.{ .@"align" = .wrap (dst_align ) })};
var src_attrs = [_ ]Attribute .Index {try self .builder .attr (.{ .@"align" = .wrap (src_align ) })};
const value = try self .callIntrinsic (
.normal ,
try self .builder .fnAttrs (&.{
.none ,
.none ,
try self .builder .attrs (&dst_attrs ),
try self .builder .attrs (&src_attrs ),
}),
if (@"inline" ) .@"memcpy.inline" else .memcpy ,
&.{ dst .typeOfWip (self ), src .typeOfWip (self ), len .typeOfWip (self ) },
&.{ dst , src , len , switch (kind ) {
.normal => Value .false ,
.@"volatile" => Value .true ,
} },
undefined ,
);
return value .unwrap ().instruction ;
}