diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2020-06-26 12:58:02 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-08-12 03:50:12 -0400 |
commit | accbc242e555822a2060091af7188ce6e9b0144e (patch) | |
tree | 641ced97452a46a0ff17f6754d2150e283c9b9ca /compiler/GHC/CmmToLlvm | |
parent | f1088b3f31ceddf918a319c97557fb1f08a9a387 (diff) | |
download | haskell-accbc242e555822a2060091af7188ce6e9b0144e.tar.gz |
DynFlags: disentangle Outputable
- put panic related functions into GHC.Utils.Panic
- put trace related functions using DynFlags in GHC.Driver.Ppr
One step closer making Outputable fully independent of DynFlags.
Bump haddock submodule
Diffstat (limited to 'compiler/GHC/CmmToLlvm')
-rw-r--r-- | compiler/GHC/CmmToLlvm/CodeGen.hs | 13 | ||||
-rw-r--r-- | compiler/GHC/CmmToLlvm/Data.hs | 2 | ||||
-rw-r--r-- | compiler/GHC/CmmToLlvm/Ppr.hs | 2 | ||||
-rw-r--r-- | compiler/GHC/CmmToLlvm/Regs.hs | 2 |
4 files changed, 12 insertions, 7 deletions
diff --git a/compiler/GHC/CmmToLlvm/CodeGen.hs b/compiler/GHC/CmmToLlvm/CodeGen.hs index 5581928a55..916931eefa 100644 --- a/compiler/GHC/CmmToLlvm/CodeGen.hs +++ b/compiler/GHC/CmmToLlvm/CodeGen.hs @@ -10,6 +10,9 @@ module GHC.CmmToLlvm.CodeGen ( genLlvmProc ) where import GHC.Prelude +import GHC.Driver.Session +import GHC.Driver.Ppr + import GHC.Llvm import GHC.CmmToLlvm.Base import GHC.CmmToLlvm.Regs @@ -25,11 +28,11 @@ import GHC.Cmm.Dataflow.Block import GHC.Cmm.Dataflow.Graph import GHC.Cmm.Dataflow.Collections -import GHC.Driver.Session import GHC.Data.FastString import GHC.Types.ForeignCall -import GHC.Utils.Outputable hiding (panic, pprPanic) -import qualified GHC.Utils.Outputable as Outputable +import GHC.Utils.Outputable +import GHC.Utils.Panic (assertPanic) +import qualified GHC.Utils.Panic as Panic import GHC.Platform import GHC.Data.OrdList import GHC.Types.Unique.Supply @@ -2001,10 +2004,10 @@ toIWord platform = mkIntLit (llvmWord platform) -- | Error functions panic :: HasCallStack => String -> a -panic s = Outputable.panic $ "GHC.CmmToLlvm.CodeGen." ++ s +panic s = Panic.panic $ "GHC.CmmToLlvm.CodeGen." ++ s pprPanic :: HasCallStack => String -> SDoc -> a -pprPanic s d = Outputable.pprPanic ("GHC.CmmToLlvm.CodeGen." ++ s) d +pprPanic s d = Panic.pprPanic ("GHC.CmmToLlvm.CodeGen." ++ s) d -- | Returns TBAA meta data by unique diff --git a/compiler/GHC/CmmToLlvm/Data.hs b/compiler/GHC/CmmToLlvm/Data.hs index ac155179d1..79e2e1a28b 100644 --- a/compiler/GHC/CmmToLlvm/Data.hs +++ b/compiler/GHC/CmmToLlvm/Data.hs @@ -20,7 +20,7 @@ import GHC.Cmm import GHC.Platform import GHC.Data.FastString -import GHC.Utils.Outputable +import GHC.Utils.Panic import qualified Data.ByteString as BS -- ---------------------------------------------------------------------------- diff --git a/compiler/GHC/CmmToLlvm/Ppr.hs b/compiler/GHC/CmmToLlvm/Ppr.hs index 49374a9869..6519eee637 100644 --- a/compiler/GHC/CmmToLlvm/Ppr.hs +++ b/compiler/GHC/CmmToLlvm/Ppr.hs @@ -11,6 +11,8 @@ module GHC.CmmToLlvm.Ppr ( import GHC.Prelude +import GHC.Driver.Ppr + import GHC.Llvm import GHC.CmmToLlvm.Base import GHC.CmmToLlvm.Data diff --git a/compiler/GHC/CmmToLlvm/Regs.hs b/compiler/GHC/CmmToLlvm/Regs.hs index dc878fce30..411ec22bbb 100644 --- a/compiler/GHC/CmmToLlvm/Regs.hs +++ b/compiler/GHC/CmmToLlvm/Regs.hs @@ -18,7 +18,7 @@ import GHC.Llvm import GHC.Cmm.Expr import GHC.Platform import GHC.Data.FastString -import GHC.Utils.Outputable ( panic ) +import GHC.Utils.Panic ( panic ) import GHC.Types.Unique -- | Get the LlvmVar function variable storing the real register |