summaryrefslogtreecommitdiff
path: root/ghc
diff options
context:
space:
mode:
authordoug <douglas.wilson@gmail.com>2017-05-04 14:16:17 -0400
committerBen Gamari <ben@smart-cactus.org>2017-05-04 18:20:44 -0400
commitdb10b79994f7728cbaaa906c6f6eda0b6783df29 (patch)
tree16c260e5f30d7773fd5d05df1facedfb4293171c /ghc
parenta660844c0859b7a2e76c15f2fb4abec209afea90 (diff)
downloadhaskell-db10b79994f7728cbaaa906c6f6eda0b6783df29.tar.gz
Pass -ffrontend-opt arguments to frontend plugin in the correct order
Previously they were passed in the reverse order that they're specified on the command line. Add a haddock to frontendPluginOpts in DynFlags.hs. Modify test frontend01 to cover the case of multiple -ffrontend-opt. Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie GHC Trac Issues: #13632 Differential Revision: https://phabricator.haskell.org/D3520
Diffstat (limited to 'ghc')
-rw-r--r--ghc/Main.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/ghc/Main.hs b/ghc/Main.hs
index 6ece4302db..0a4e17aa7d 100644
--- a/ghc/Main.hs
+++ b/ghc/Main.hs
@@ -837,7 +837,8 @@ doFrontend modname _ = pluginError [modname]
doFrontend modname srcs = do
hsc_env <- getSession
frontend_plugin <- liftIO $ loadFrontendPlugin hsc_env modname
- frontend frontend_plugin (frontendPluginOpts (hsc_dflags hsc_env)) srcs
+ frontend frontend_plugin
+ (reverse $ frontendPluginOpts (hsc_dflags hsc_env)) srcs
#endif
-- -----------------------------------------------------------------------------