diff options
author | Andre Marianiello <andremarianiello@users.noreply.github.com> | 2022-05-08 15:24:17 -0400 |
---|---|---|
committer | andremarianiello <andre.marianiello@gmail.com> | 2022-05-12 02:15:48 +0000 |
commit | 3a022baa1967e2df2ed19341de38b004dc07c04f (patch) | |
tree | 0f41c5edb4a320570097d3a2f9e7237f0e8117cb /compiler | |
parent | a2dcad4e6f75c08aacc5902a20ca4c773819d7b7 (diff) | |
download | haskell-3a022baa1967e2df2ed19341de38b004dc07c04f.tar.gz |
Remove Module argument from initCmmParserConfig
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/GHC/Driver/Config/Cmm/Parser.hs | 9 | ||||
-rw-r--r-- | compiler/GHC/Driver/Main.hs | 3 |
2 files changed, 5 insertions, 7 deletions
diff --git a/compiler/GHC/Driver/Config/Cmm/Parser.hs b/compiler/GHC/Driver/Config/Cmm/Parser.hs index 3749bfd87c..4cd1c25b49 100644 --- a/compiler/GHC/Driver/Config/Cmm/Parser.hs +++ b/compiler/GHC/Driver/Config/Cmm/Parser.hs @@ -9,8 +9,7 @@ import GHC.Driver.Config.Parser import GHC.Driver.Config.StgToCmm import GHC.Driver.Session -import GHC.Unit.Types - +import GHC.Utils.Panic initPDConfig :: DynFlags -> PDConfig initPDConfig dflags = PDConfig @@ -18,10 +17,10 @@ initPDConfig dflags = PDConfig , pdSanitizeAlignment = gopt Opt_AlignmentSanitisation dflags } -initCmmParserConfig :: DynFlags -> Module -> CmmParserConfig -initCmmParserConfig dflags mod = CmmParserConfig +initCmmParserConfig :: DynFlags -> CmmParserConfig +initCmmParserConfig dflags = CmmParserConfig { cmmpParserOpts = initParserOpts dflags , cmmpPDConfig = initPDConfig dflags - , cmmpStgToCmmConfig = initStgToCmmConfig dflags mod + , cmmpStgToCmmConfig = initStgToCmmConfig dflags (panic "initCmmParserConfig: no module") } diff --git a/compiler/GHC/Driver/Main.hs b/compiler/GHC/Driver/Main.hs index 2e42a9767a..f45cdc8020 100644 --- a/compiler/GHC/Driver/Main.hs +++ b/compiler/GHC/Driver/Main.hs @@ -1746,8 +1746,7 @@ hscCompileCmmFile hsc_env original_filename filename output_filename = runHsc hs -- lest we reproduce #11784. mod_name = mkModuleName $ "Cmm$" ++ original_filename cmm_mod = mkHomeModule home_unit mod_name - no_module = panic "hscCompileCmmFile: no module" - cmmpConfig = initCmmParserConfig dflags no_module + cmmpConfig = initCmmParserConfig dflags (cmm, ents) <- ioMsgMaybe $ do (warns,errs,cmm) <- withTiming logger (text "ParseCmm"<+>brackets (text filename)) (\_ -> ()) |