diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2020-06-29 22:36:40 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-07-22 20:19:59 -0400 |
commit | f7cc431341e5b5b31758eecc8504cae8b2390c10 (patch) | |
tree | 7404d90376432d5a311a7fc6355b02085a1a5367 /testsuite | |
parent | 735f9d6bac316a0c1c68a8b49bba465f07b01cdd (diff) | |
download | haskell-f7cc431341e5b5b31758eecc8504cae8b2390c10.tar.gz |
Replace HscTarget with Backend
They both have the same role and Backend name is more explicit.
Metric Decrease:
T3064
Update Haddock submodule
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/tests/driver/T5313.hs | 2 | ||||
-rw-r--r-- | testsuite/tests/ghc-api/T10052/T10052.hs | 2 | ||||
-rw-r--r-- | testsuite/tests/ghc-api/T8639_api.hs | 2 | ||||
-rw-r--r-- | testsuite/tests/ghc-api/apirecomp001/myghc.hs | 7 | ||||
-rw-r--r-- | testsuite/tests/ghci/linking/dyn/T3372.hs | 2 | ||||
-rw-r--r-- | testsuite/tests/rts/linker/LinkerUnload.hs | 5 |
6 files changed, 11 insertions, 9 deletions
diff --git a/testsuite/tests/driver/T5313.hs b/testsuite/tests/driver/T5313.hs index 5b73f11adf..7379e9bb53 100644 --- a/testsuite/tests/driver/T5313.hs +++ b/testsuite/tests/driver/T5313.hs @@ -7,7 +7,7 @@ main = do -- begin initialize df0 <- GHC.getSessionDynFlags let df1 = df0{GHC.ghcMode = GHC.CompManager, - GHC.hscTarget = GHC.HscInterpreted, + GHC.backend = GHC.Interpreter, GHC.ghcLink = GHC.LinkInMemory, GHC.verbosity = 0} _ <- GHC.setSessionDynFlags df1 diff --git a/testsuite/tests/ghc-api/T10052/T10052.hs b/testsuite/tests/ghc-api/T10052/T10052.hs index a2e50a6bc6..03a4a65d6e 100644 --- a/testsuite/tests/ghc-api/T10052/T10052.hs +++ b/testsuite/tests/ghc-api/T10052/T10052.hs @@ -21,7 +21,7 @@ runGhc' args act = do dflags0 <- getSessionDynFlags (dflags1, _leftover, _warns) <- parseDynamicFlags dflags0 flags let dflags2 = dflags1 { - hscTarget = HscInterpreted + backend = Interpreter , ghcLink = LinkInMemory , verbosity = 1 } diff --git a/testsuite/tests/ghc-api/T8639_api.hs b/testsuite/tests/ghc-api/T8639_api.hs index 48024f6726..3b7648e397 100644 --- a/testsuite/tests/ghc-api/T8639_api.hs +++ b/testsuite/tests/ghc-api/T8639_api.hs @@ -10,7 +10,7 @@ main = do { [libdir] <- getArgs ; runGhc (Just libdir) $ do flags <- getSessionDynFlags - setSessionDynFlags (flags{ hscTarget = HscInterpreted, ghcLink = LinkInMemory}) + setSessionDynFlags (flags{ backend = Interpreter, ghcLink = LinkInMemory}) target <- guessTarget "T8639_api_a.hs" Nothing setTargets [target] load LoadAllTargets diff --git a/testsuite/tests/ghc-api/apirecomp001/myghc.hs b/testsuite/tests/ghc-api/apirecomp001/myghc.hs index 0b65d5add6..03c57e93a5 100644 --- a/testsuite/tests/ghc-api/apirecomp001/myghc.hs +++ b/testsuite/tests/ghc-api/apirecomp001/myghc.hs @@ -11,6 +11,7 @@ module Main where import GHC import GHC.Driver.Session +import GHC.Driver.Backend import GHC.Utils.Monad ( MonadIO(..) ) import GHC.Types.Basic ( failed ) import GHC.Data.Bag ( bagToList ) @@ -24,8 +25,8 @@ main = do dflags0 <- getSessionDynFlags (dflags, _, _) <- parseDynamicFlags dflags0 (map (mkGeneralLocated "on the commandline") args) - setSessionDynFlags $ dflags { hscTarget = HscNothing - , ghcLink = LinkInMemory + setSessionDynFlags $ dflags { backend = NoBackend + , ghcLink = LinkInMemory , verbosity = 0 -- silence please } root_mod <- guessTarget "A.hs" Nothing @@ -35,7 +36,7 @@ main = do prn "target nothing: ok" dflags <- getSessionDynFlags - setSessionDynFlags $ dflags { hscTarget = HscInterpreted } + setSessionDynFlags $ dflags { backend = Interpreter } ok <- load LoadAllTargets when (failed ok) $ error "Couldn't load A.hs in interpreted mode" prn "target interpreted: ok" diff --git a/testsuite/tests/ghci/linking/dyn/T3372.hs b/testsuite/tests/ghci/linking/dyn/T3372.hs index 3234ff9cdf..f128c9bb45 100644 --- a/testsuite/tests/ghci/linking/dyn/T3372.hs +++ b/testsuite/tests/ghci/linking/dyn/T3372.hs @@ -41,7 +41,7 @@ newGhcServer = do (libdir:_) <- getArgs where ghc action libdir = GHC.runGhc (Just libdir) (init >> action) init = do df <- GHC.getSessionDynFlags GHC.setSessionDynFlags df{GHC.ghcMode = GHC.CompManager, - GHC.hscTarget = GHC.HscInterpreted, + GHC.backend = GHC.Interpreter, GHC.ghcLink = GHC.LinkInMemory, GHC.verbosity = 0} diff --git a/testsuite/tests/rts/linker/LinkerUnload.hs b/testsuite/tests/rts/linker/LinkerUnload.hs index 7d83508400..9c1d08249c 100644 --- a/testsuite/tests/rts/linker/LinkerUnload.hs +++ b/testsuite/tests/rts/linker/LinkerUnload.hs @@ -3,6 +3,7 @@ module LinkerUnload (init) where import GHC import GHC.Unit.State import GHC.Driver.Session +import GHC.Driver.Backend import GHC.Runtime.Linker as Linker import System.Environment import GHC.Utils.Monad ( MonadIO(..) ) @@ -14,8 +15,8 @@ loadPackages = do [libdir] <- getArgs runGhc (Just libdir) $ do dflags <- getSessionDynFlags - let dflags' = dflags { hscTarget = HscNothing - , ghcLink = LinkInMemory } + let dflags' = dflags { backend = NoBackend + , ghcLink = LinkInMemory } setSessionDynFlags dflags' hsc_env <- getSession liftIO $ Linker.linkPackages hsc_env (preloadUnits (unitState dflags')) |