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 › extractValue Public Function extractValue Doc Source Public Function std.zig.llvm.Builder.WipFunction.extractValue
pub fn extractValue (
self : *WipFunction ,
val : Value ,
indices : []const u32 ,
name : []const u8 ,
) Allocator .Error !Value Params File zig/llvm/Builder.zig: 6727
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745 pub fn extractValue (
self : *WipFunction ,
val : Value ,
indices : []const u32 ,
name : []const u8 ,
) Allocator .Error !Value {
assert (indices .len > 0 );
_ = val .typeOfWip (self ).childTypeAt (indices , self .builder );
try self .ensureUnusedExtraCapacity (1 , Instruction .ExtractValue , indices .len );
const instruction = try self .addInst (name , .{
.tag = .extractvalue ,
.data = self .addExtraAssumeCapacity (Instruction .ExtractValue {
.val = val ,
.indices_len = @intCast (indices .len ),
}),
});
self .extra .appendSliceAssumeCapacity (indices );
return instruction .toValue ();
}