summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorAustin Seipp <austin@well-typed.com>2014-01-07 00:59:17 -0600
committerAustin Seipp <austin@well-typed.com>2014-01-07 00:59:17 -0600
commit949be3f6ffb80d4f24c50fb9c9c5495762f01476 (patch)
treea7fda4c1e6f6df451b0ede5f263daae9a2d9c380 /compiler
parente25af05656b496b997c8f3520e5ac8e377a68e7b (diff)
downloadhaskell-949be3f6ffb80d4f24c50fb9c9c5495762f01476.tar.gz
Fix __GLASGOW_HASKELL_LLVM__ #define
(It improperly used 'show' on the Maybe Int, not the Int.) Authored-by: Karel Gardas <karel.gardas@centrum.cz> Signed-off-by: Austin Seipp <austin@well-typed.com>
Diffstat (limited to 'compiler')
-rw-r--r--compiler/main/DriverPipeline.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs
index 337778e251..f789d441b9 100644
--- a/compiler/main/DriverPipeline.hs
+++ b/compiler/main/DriverPipeline.hs
@@ -2086,7 +2086,9 @@ doCpp dflags raw input_fn output_fn = do
getBackendDefs :: DynFlags -> IO [String]
getBackendDefs dflags | hscTarget dflags == HscLlvm = do
llvmVer <- figureLlvmVersion dflags
- return [ "-D__GLASGOW_HASKELL_LLVM__="++show llvmVer ]
+ return $ case llvmVer of
+ Just n -> [ "-D__GLASGOW_HASKELL_LLVM__="++show n ]
+ _ -> []
getBackendDefs _ =
return []