pub fn typeDecls(zir: Zir, type_decl: Inst.Index) []const Zir.Inst.Index 5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266pub fn typeDecls(zir: Zir, type_decl: Inst.Index) []const Zir.Inst.Index {
const inst = zir.instructions.get(@backingInt(type_decl));
assert(inst.tag == .extended);
return switch (inst.data.extended.opcode) {
.struct_decl => zir.getStructDecl(type_decl).decls,
.union_decl => zir.getUnionDecl(type_decl).decls,
.enum_decl => zir.getEnumDecl(type_decl).decls,
.opaque_decl => zir.getOpaqueDecl(type_decl).decls,
else => unreachable,
};
}