diff options
Diffstat (limited to 'compiler/cmm/PprCmmExpr.hs')
-rw-r--r-- | compiler/cmm/PprCmmExpr.hs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/compiler/cmm/PprCmmExpr.hs b/compiler/cmm/PprCmmExpr.hs index 77c92407bc..219b287f01 100644 --- a/compiler/cmm/PprCmmExpr.hs +++ b/compiler/cmm/PprCmmExpr.hs @@ -53,6 +53,9 @@ instance Outputable CmmExpr where instance Outputable CmmReg where ppr e = pprReg e +instance Outputable CmmArg where + ppr a = pprArg a + instance Outputable CmmLit where ppr l = pprLit l @@ -275,5 +278,11 @@ pprGlobalReg gr ----------------------------------------------------------------------------- +pprArg :: CmmArg -> SDoc +pprArg (CmmExprArg e) = ppr e +pprArg (CmmRubbishArg ty) = text "Rubbish" <+> dcolon <+> ppr ty + +----------------------------------------------------------------------------- + commafy :: [SDoc] -> SDoc commafy xs = fsep $ punctuate comma xs |