[commit: ghc] master: Fix pprCLabel on platforms without native codegen. (3c7cf18)

git at git.haskell.org git at git.haskell.org
Thu Dec 15 15:43:43 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/3c7cf18c5ed8cb20c37732258db616d8858619a7/ghc

>---------------------------------------------------------------

commit 3c7cf18c5ed8cb20c37732258db616d8858619a7
Author: Shea Levy <shea at shealevy.com>
Date:   Wed Dec 14 16:46:27 2016 -0500

    Fix pprCLabel on platforms without native codegen.
    
    D1290 added a panic in a code path that can be reached when
    !cGhcWithNativeCodeGen.  This reverts just that part of that patch.
    
    Reviewers: austin, simonmar, bgamari, xnyhps
    
    Reviewed By: simonmar
    
    Subscribers: xnyhps, thomie
    
    Differential Revision: https://phabricator.haskell.org/D2831


>---------------------------------------------------------------

3c7cf18c5ed8cb20c37732258db616d8858619a7
 compiler/cmm/CLabel.hs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/compiler/cmm/CLabel.hs b/compiler/cmm/CLabel.hs
index 7317ea4..3fd081c 100644
--- a/compiler/cmm/CLabel.hs
+++ b/compiler/cmm/CLabel.hs
@@ -1113,8 +1113,8 @@ pprAsmCLbl _ lbl
    = pprCLbl lbl
 
 pprCLbl :: CLabel -> SDoc
-pprCLbl (StringLitLabel _)
-  = panic "pprCLbl StringLitLabel"
+pprCLbl (StringLitLabel u)
+  = pprUnique u <> text "_str"
 
 pprCLbl (CaseLabel u CaseReturnPt)
   = hcat [pprUnique u, text "_ret"]



More information about the ghc-commits mailing list