[commit: ghc] master: Remove LlvmCodeGen panic variants. (79bfe27)

git at git.haskell.org git at git.haskell.org
Tue Apr 14 12:33:25 UTC 2015


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/79bfe27d9157fb3d44b4cc64f168bc11191d3f9b/ghc

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

commit 79bfe27d9157fb3d44b4cc64f168bc11191d3f9b
Author: Edward Z. Yang <ezyang at cs.stanford.edu>
Date:   Tue Apr 14 07:32:17 2015 -0500

    Remove LlvmCodeGen panic variants.
    
    It's pretty irritating having hasktags with multiple top-level
    declarations with the same type; hasktags can't figure out which
    declaration you actually wanted.
    
    Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu>
    
    Reviewed By: dterei, austin
    
    Differential Revision: https://phabricator.haskell.org/D819


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

79bfe27d9157fb3d44b4cc64f168bc11191d3f9b
 compiler/llvmGen/LlvmCodeGen/Base.hs    | 10 +---------
 compiler/llvmGen/LlvmCodeGen/CodeGen.hs | 11 +----------
 compiler/llvmGen/LlvmCodeGen/Data.hs    | 10 +---------
 3 files changed, 3 insertions(+), 28 deletions(-)

diff --git a/compiler/llvmGen/LlvmCodeGen/Base.hs b/compiler/llvmGen/LlvmCodeGen/Base.hs
index 15918a3..5ef0a4b 100644
--- a/compiler/llvmGen/LlvmCodeGen/Base.hs
+++ b/compiler/llvmGen/LlvmCodeGen/Base.hs
@@ -45,7 +45,7 @@ import CodeGen.Platform ( activeStgRegs )
 import DynFlags
 import FastString
 import Cmm
-import qualified Outputable as Outp
+import Outputable as Outp
 import qualified Pretty as Prt
 import Platform
 import UniqFM
@@ -538,11 +538,3 @@ aliasify (LMGlobal var val) = do
 -- away with casting the alias to the desired type in @getSymbolPtr@
 -- and instead just emit a reference to the definition symbol directly.
 -- This is the @Just@ case in @getSymbolPtr at .
-
--- ----------------------------------------------------------------------------
--- * Misc
---
-
--- | Error function
-panic :: String -> a
-panic s = Outp.panic $ "LlvmCodeGen.Base." ++ s
diff --git a/compiler/llvmGen/LlvmCodeGen/CodeGen.hs b/compiler/llvmGen/LlvmCodeGen/CodeGen.hs
index 4f864b6..3a7c05b 100644
--- a/compiler/llvmGen/LlvmCodeGen/CodeGen.hs
+++ b/compiler/llvmGen/LlvmCodeGen/CodeGen.hs
@@ -24,8 +24,7 @@ import Hoopl
 import DynFlags
 import FastString
 import ForeignCall
-import Outputable hiding ( panic, pprPanic )
-import qualified Outputable
+import Outputable
 import Platform
 import OrdList
 import UniqSupply
@@ -1673,14 +1672,6 @@ toIWord :: Integral a => DynFlags -> a -> LlvmVar
 toIWord dflags = mkIntLit (llvmWord dflags)
 
 
--- | Error functions
-panic :: String -> a
-panic s = Outputable.panic $ "LlvmCodeGen.CodeGen." ++ s
-
-pprPanic :: String -> SDoc -> a
-pprPanic s d = Outputable.pprPanic ("LlvmCodeGen.CodeGen." ++ s) d
-
-
 -- | Returns TBAA meta data by unique
 getTBAAMeta :: Unique -> LlvmM [MetaAnnot]
 getTBAAMeta u = do
diff --git a/compiler/llvmGen/LlvmCodeGen/Data.hs b/compiler/llvmGen/LlvmCodeGen/Data.hs
index 42f4dcd..b306748 100644
--- a/compiler/llvmGen/LlvmCodeGen/Data.hs
+++ b/compiler/llvmGen/LlvmCodeGen/Data.hs
@@ -17,7 +17,7 @@ import CLabel
 import Cmm
 
 import FastString
-import qualified Outputable
+import Outputable
 
 -- ----------------------------------------------------------------------------
 -- * Constants
@@ -127,11 +127,3 @@ genStaticLit (CmmBlock b) = genStaticLit $ CmmLabel $ infoTblLbl b
 
 genStaticLit (CmmHighStackMark)
     = panic "genStaticLit: CmmHighStackMark unsupported!"
-
--- -----------------------------------------------------------------------------
--- * Misc
---
-
--- | Error Function
-panic :: String -> a
-panic s = Outputable.panic $ "LlvmCodeGen.Data." ++ s



More information about the ghc-commits mailing list