[commit: ghc] master: Fix __GLASGOW_HASKELL_LLVM__ #define (949be3f)

git at git.haskell.org git at git.haskell.org
Tue Jan 7 14:30:17 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/949be3f6ffb80d4f24c50fb9c9c5495762f01476/ghc

>---------------------------------------------------------------

commit 949be3f6ffb80d4f24c50fb9c9c5495762f01476
Author: Austin Seipp <austin at well-typed.com>
Date:   Tue Jan 7 00:59:17 2014 -0600

    Fix __GLASGOW_HASKELL_LLVM__ #define
    
    (It improperly used 'show' on the Maybe Int, not the Int.)
    
    Authored-by: Karel Gardas <karel.gardas at centrum.cz>
    Signed-off-by: Austin Seipp <austin at well-typed.com>


>---------------------------------------------------------------

949be3f6ffb80d4f24c50fb9c9c5495762f01476
 compiler/main/DriverPipeline.hs |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs
index 337778e..f789d44 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 []



More information about the ghc-commits mailing list