Add OpSwitch

This commit is contained in:
ReinUsesLisp 2019-01-05 23:58:43 -03:00
parent e7971b4451
commit 2b0a59d890
2 changed files with 21 additions and 0 deletions

View file

@ -192,6 +192,11 @@ class Module {
std::uint32_t true_weight = 0,
std::uint32_t false_weight = 0);
/// Multi-way branch to one of the operand label.
Id OpSwitch(Id selector, Id default_label,
const std::vector<Literal>& literals,
const std::vector<Id>& labels);
/// Returns with no value from a function with void return type.
Id OpReturn();