1use xir::{Block, Context, Operation, Span, Type};
4
5pub fn r#if<'a>(context: &'a Context<'a>, types: &[Type<'a>], span: Span<'a>) -> Operation<'a> {
7 Operation::new(context, "scf.if", &[], types, [], span)
8}
9
10pub fn r#while<'a>(
12 context: &'a Context<'a>,
13 types: &[Type<'a>],
14 before: Block<'a>,
15 after: Block<'a>,
16 span: Span<'a>,
17) -> Operation<'a> {
18 Operation::new(context, "scf.while", &[], types, [before, after], span)
19}
20
21pub fn r#yield<'a>(context: &'a Context<'a>, types: &[Type<'a>], span: Span<'a>) -> Operation<'a> {
23 Operation::new(context, "scf.while", &[], types, [], span)
24}