diff options
author | Ömer Sinan Ağacan <omeragacan@gmail.com> | 2015-12-18 12:21:47 -0500 |
---|---|---|
committer | Ömer Sinan Ağacan <omeragacan@gmail.com> | 2015-12-18 12:41:44 -0500 |
commit | 0e9a331f25c89c6150a43d7d5d27ef5cb6e057ec (patch) | |
tree | 30b76216249131f8dd2195bfcbee454a47cd8680 /compiler/llvmGen/LlvmCodeGen/Base.hs | |
parent | 4198b81488c300a52c9d60d3740a9d3b738e3ac9 (diff) | |
download | haskell-0e9a331f25c89c6150a43d7d5d27ef5cb6e057ec.tar.gz |
LLVM backend: Show expected LLVM version in warnings/errors
Summary:
Before:
[1 of 1] Compiling Main ( Main.hs, Main.o )
You are using a new version of LLVM that hasn't been tested yet!
We will try though...
After:
[1 of 1] Compiling Main ( Main.hs, Main.o )
You are using an unsupported version of LLVM!
Currently only 3.7 is supported.
We will try though...
Before:
[1 of 1] Compiling Main ( Main.hs, Main.o )
<no location info>:
Warning: Couldn't figure out LLVM version!
Make sure you have installed LLVM
ghc: could not execute: opt
After:
[1 of 1] Compiling Main ( Main.hs, Main.o )
<no location info>: error:
Warning: Couldn't figure out LLVM version!
Make sure you have installed LLVM 3.7
ghc-stage1: could not execute: opt
Reviewers: austin, rwbarton, bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1658
Diffstat (limited to 'compiler/llvmGen/LlvmCodeGen/Base.hs')
-rw-r--r-- | compiler/llvmGen/LlvmCodeGen/Base.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/llvmGen/LlvmCodeGen/Base.hs b/compiler/llvmGen/LlvmCodeGen/Base.hs index 3367cdaf45..82c1eeaaf0 100644 --- a/compiler/llvmGen/LlvmCodeGen/Base.hs +++ b/compiler/llvmGen/LlvmCodeGen/Base.hs @@ -12,7 +12,7 @@ module LlvmCodeGen.Base ( LiveGlobalRegs, LlvmUnresData, LlvmData, UnresLabel, UnresStatic, - LlvmVersion, supportedLlvmVersion, + LlvmVersion, supportedLlvmVersion, llvmVersionStr, LlvmM, runLlvm, liftStream, withClearVars, varLookup, varInsert, @@ -184,6 +184,9 @@ type LlvmVersion = (Int, Int) supportedLlvmVersion :: LlvmVersion supportedLlvmVersion = sUPPORTED_LLVM_VERSION +llvmVersionStr :: LlvmVersion -> String +llvmVersionStr (major, minor) = show major ++ "." ++ show minor + -- ---------------------------------------------------------------------------- -- * Environment Handling -- |