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 › debugSubprogramAssumeCapacity Private Function debugSubprogramAssumeCapacity Doc Source 13865
13866
13867
13868
13869
13870
13871
13872
13873
13874
13875
13876
13877
13878
13879
13880
13881
13882
13883
13884
13885
13886
13887
13888
13889 fn debugSubprogramAssumeCapacity (
self : *Builder ,
file : ?Metadata ,
name : ?Metadata .String ,
linkage_name : ?Metadata .String ,
line : u32 ,
scope_line : u32 ,
ty : ?Metadata ,
options : Metadata .Subprogram .Options ,
compile_unit : ?Metadata ,
) Metadata {
assert (!self .strip );
const tag : Metadata .Tag = @fromBackingInt (@backingInt (Metadata .Tag .subprogram ) +
@as (u3 , @truncate (@as (u32 , @bitCast (options .sp_flags )) >> 2 )));
return self .metadataDistinctAssumeCapacity (tag , Metadata .Subprogram {
.file = .wrap (file ),
.name = .wrap (name ),
.linkage_name = .wrap (linkage_name ),
.line = line ,
.scope_line = scope_line ,
.ty = .wrap (ty ),
.di_flags = options .di_flags ,
.compile_unit = .wrap (compile_unit ),
});
}