[commit: ghc] master: C codegen: print details of pprStatics panics (9ea4596)
git at git.haskell.org
git at git.haskell.org
Sat Jun 2 21:27:22 UTC 2018
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/9ea45963ad2ef2051ca3689562607eb4916d65e8/ghc
>---------------------------------------------------------------
commit 9ea45963ad2ef2051ca3689562607eb4916d65e8
Author: Sergei Trofimovich <slyfox at gentoo.org>
Date: Sat Jun 2 21:08:06 2018 +0000
C codegen: print details of pprStatics panics
Signed-off-by: Sergei Trofimovich <slyfox at gentoo.org>
>---------------------------------------------------------------
9ea45963ad2ef2051ca3689562607eb4916d65e8
compiler/cmm/PprC.hs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/compiler/cmm/PprC.hs b/compiler/cmm/PprC.hs
index f3f9d3c..e8f7144 100644
--- a/compiler/cmm/PprC.hs
+++ b/compiler/cmm/PprC.hs
@@ -540,11 +540,11 @@ pprStatics dflags (CmmStaticLit (CmmInt i W64) : rest)
q = i `shiftR` 32
pprStatics dflags (CmmStaticLit (CmmInt _ w) : _)
| w /= wordWidth dflags
- = panic "pprStatics: cannot emit a non-word-sized static literal"
+ = pprPanic "pprStatics: cannot emit a non-word-sized static literal" (ppr w)
pprStatics dflags (CmmStaticLit lit : rest)
= pprLit1 lit : pprStatics dflags rest
pprStatics _ (other : _)
- = pprPanic "pprWord" (pprStatic other)
+ = pprPanic "pprStatics: other" (pprStatic other)
pprStatic :: CmmStatic -> SDoc
pprStatic s = case s of
More information about the ghc-commits
mailing list