mirror of
https://git.suyu.dev/suyu/sirit.git
synced 2026-02-19 08:43:01 +00:00
Add OpBranch
This commit is contained in:
@@ -30,6 +30,12 @@ Ref Module::Label() {
|
||||
return AddCode(spv::Op::OpLabel, bound++);
|
||||
}
|
||||
|
||||
Ref Module::Branch(Ref target_label) {
|
||||
Op* op{new Op(spv::Op::OpBranch)};
|
||||
op->Add(target_label);
|
||||
return AddCode(op);
|
||||
}
|
||||
|
||||
Ref Module::Return() {
|
||||
return AddCode(spv::Op::OpReturn);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user