summaryrefslogtreecommitdiff
path: root/src/trans/codegen_c_structured.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/trans/codegen_c_structured.cpp')
-rw-r--r--src/trans/codegen_c_structured.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/trans/codegen_c_structured.cpp b/src/trans/codegen_c_structured.cpp
index e89d7589..888f9a26 100644
--- a/src/trans/codegen_c_structured.cpp
+++ b/src/trans/codegen_c_structured.cpp
@@ -191,6 +191,9 @@ public:
refs.push_back(Node::make_Switch({ exit_bb, &te.val, mv$(arms) }));
stop = true;
),
+ (SwitchValue,
+ TODO(Span(), "SwitchValue");
+ ),
(Call,
// NOTE: Let the panic arm just be a goto
bb_idx = te.ret_block;
@@ -260,6 +263,11 @@ public:
for(auto tgt : te.targets)
conv.m_block_ref_count[tgt] += 1;
),
+ (SwitchValue,
+ for(auto tgt : te.targets)
+ conv.m_block_ref_count[tgt] += 1;
+ conv.m_block_ref_count[te.def_target] += 1;
+ ),
(Call,
conv.m_block_ref_count[te.ret_block] += 1;
conv.m_block_ref_count[te.panic_block] += 1;