diff options
Diffstat (limited to 'testsuite/tests/ghc-api')
-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 |
3 files changed, 6 insertions, 5 deletions
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" |