mirror of
https://git.suyu.dev/suyu/sirit.git
synced 2025-12-31 19:54:53 +01:00
Add OpReturnValue
This commit is contained in:
parent
91e0769db5
commit
798f8a5866
2 changed files with 28 additions and 20 deletions
|
|
@ -53,4 +53,10 @@ Id Module::OpBranchConditional(Id condition, Id true_label, Id false_label,
|
|||
|
||||
Id Module::OpReturn() { return AddCode(spv::Op::OpReturn); }
|
||||
|
||||
Id Module::OpReturnValue(Id value) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpReturnValue)};
|
||||
op->Add(value);
|
||||
return AddCode(std::move(op));
|
||||
}
|
||||
|
||||
} // namespace Sirit
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue