X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fmain%2FCodeOutput.lhs;h=921bbde44729ef8d84c45cadabcc3399a30e1d32;hb=9c84f11b774960077d33d94a23ebc42af79d2ec4;hp=40f4f11a818d286b55487d0637fda98612b6a7d2;hpb=49a8e5c021009430d373d6224b29004c7d18c408;p=ghc-hetmet.git diff --git a/compiler/main/CodeOutput.lhs b/compiler/main/CodeOutput.lhs index 40f4f11..921bbde 100644 --- a/compiler/main/CodeOutput.lhs +++ b/compiler/main/CodeOutput.lhs @@ -11,11 +11,9 @@ module CodeOutput( codeOutput, outputForeignStubs ) where #ifndef OMIT_NATIVE_CODEGEN import AsmCodeGen ( nativeCodeGen ) #endif +import LlvmCodeGen ( llvmCodeGen ) import UniqSupply ( mkSplitUniqSupply ) -#ifndef GHCI_TABLES_NEXT_TO_CODE -import qualified LlvmCodeGen ( llvmCodeGen ) -#endif #ifdef JAVA import JavaGen ( javaGen ) @@ -36,7 +34,7 @@ import Config import ErrUtils ( dumpIfSet_dyn, showPass, ghcExit ) import Outputable import Module -import Maybes ( firstJust ) +import Maybes ( firstJusts ) import Control.Exception import Control.Monad @@ -71,7 +69,7 @@ codeOutput dflags this_mod location foreign_stubs pkg_deps flat_abstractC do { when (dopt Opt_DoCmmLinting dflags) $ do { showPass dflags "CmmLint" ; let lints = map cmmLint flat_abstractC - ; case firstJust lints of + ; case firstJusts lints of Just err -> do { printDump err ; ghcExit dflags 1 } @@ -179,19 +177,9 @@ outputAsm _ _ _ \begin{code} outputLlvm :: DynFlags -> FilePath -> [RawCmm] -> IO () - -#ifndef GHCI_TABLES_NEXT_TO_CODE outputLlvm dflags filenm flat_absC = do ncg_uniqs <- mkSplitUniqSupply 'n' - doOutput filenm $ \f -> - LlvmCodeGen.llvmCodeGen dflags f ncg_uniqs flat_absC -#else -outputLlvm _ _ _ - = pprPanic "This compiler was built with the LLVM backend disabled" - (text ("This is because the TABLES_NEXT_TO_CODE optimisation is" - ++ " enabled, which the LLVM backend doesn't support right now.") - $+$ text "Use -fasm instead") -#endif + doOutput filenm $ \f -> llvmCodeGen dflags f ncg_uniqs flat_absC \end{code}