stage2 cbe: implement switchbr

This commit is contained in:
Veikka Tuominen
2021-01-27 11:40:34 +02:00
parent 258f3ec5ec
commit 106520329e
4 changed files with 78 additions and 43 deletions

View File

@@ -2215,7 +2215,7 @@ pub fn addSwitchBr(
self: *Module,
block: *Scope.Block,
src: usize,
target_ptr: *Inst,
target: *Inst,
cases: []Inst.SwitchBr.Case,
else_body: ir.Body,
) !*Inst {
@@ -2226,7 +2226,7 @@ pub fn addSwitchBr(
.ty = Type.initTag(.noreturn),
.src = src,
},
.target_ptr = target_ptr,
.target = target,
.cases = cases,
.else_body = else_body,
};