diff options
Diffstat (limited to 'testsuite/tests/plugins/plugin-recomp/Common.hs')
-rw-r--r-- | testsuite/tests/plugins/plugin-recomp/Common.hs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/testsuite/tests/plugins/plugin-recomp/Common.hs b/testsuite/tests/plugins/plugin-recomp/Common.hs new file mode 100644 index 0000000000..ce4f8240c8 --- /dev/null +++ b/testsuite/tests/plugins/plugin-recomp/Common.hs @@ -0,0 +1,22 @@ +{-# LANGUAGE CPP #-} +module Common where + +import GhcPlugins + +install :: [CommandLineOption] -> [CoreToDo] -> CoreM [CoreToDo] +install options todos = do + putMsgS $ "Simple Plugin Passes Queried" + putMsgS $ "Got options: " ++ unwords options + + -- Create some actual passes to continue the test. + return $ CoreDoPluginPass "Main pass" mainPass + : todos + +mainPass :: ModGuts -> CoreM ModGuts +mainPass guts = do +#if defined(RUN2) + putMsgS "Simple Plugin Pass Run 2" +#else + putMsgS "Simple Plugin Pass Run" +#endif + return guts |