cmm: Include braces on default branch as required by the parser
authorklebinger.andreas@gmx.at <klebinger.andreas@gmx.at>
Thu, 18 Jan 2018 16:05:40 +0000 (11:05 -0500)
committerBen Gamari <ben@smart-cactus.org>
Thu, 18 Jan 2018 16:05:42 +0000 (11:05 -0500)
Test Plan: Looking at cmm-dump

Reviewers: bgamari, simonmar

Reviewed By: simonmar

Subscribers: rwbarton, thomie, carter

Differential Revision: https://phabricator.haskell.org/D4293

compiler/cmm/PprCmm.hs

index 3e63127..6a93ea8 100644 (file)
@@ -252,8 +252,8 @@ pprNode node = pp_node <+> pp_debug
                             , ppr l <> semi
                             ]
             def | Just l <- mbdef = hsep
-                            [ text "default: goto"
-                            , ppr l <> semi
+                            [ text "default:"
+                            , braces (text "goto" <+> ppr l <> semi)
                             ]
                 | otherwise = empty