summaryrefslogtreecommitdiff
path: root/compiler/PrePasses.ml
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/PrePasses.ml')
-rw-r--r--compiler/PrePasses.ml5
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/PrePasses.ml b/compiler/PrePasses.ml
index 1bdaf174..082a81ba 100644
--- a/compiler/PrePasses.ml
+++ b/compiler/PrePasses.ml
@@ -121,10 +121,9 @@ let remove_useless_cf_merges (crate : A.crate) (f : A.fun_decl) : A.fun_decl =
method! visit_Sequence env st1 st2 =
match st1.content with
- | Switch (op, tgts) ->
+ | Switch switch ->
if can_be_moved st2 then
- super#visit_Switch env op
- (chain_statements_in_switch_targets tgts st2)
+ super#visit_Switch env (chain_statements_in_switch switch st2)
else super#visit_Sequence env st1 st2
| _ -> super#visit_Sequence env st1 st2
end