Created
November 23, 2018 15:00
-
-
Save bgamari/c103f31965722c51922d4ee0693089ae to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/compiler/llvmGen/Llvm/MetaData.hs b/compiler/llvmGen/Llvm/MetaData.hs | |
index 3199506431..012567f2c8 100644 | |
--- a/compiler/llvmGen/Llvm/MetaData.hs | |
+++ b/compiler/llvmGen/Llvm/MetaData.hs | |
@@ -110,12 +110,14 @@ instance Outputable MetaExpr where | |
[ (text "types", ppr $ MetaStruct distType ) ] | |
ppr (MetaDICompileUnit {..}) = | |
specialMetadata "DICompileUnit" | |
- [ (text "language" , ftext dicuLanguage) | |
- , (text "file" , ppr dicuFile) | |
- , (text "producer" , doubleQuotes $ ftext dicuProducer) | |
- , (text "isOptimized", if dicuIsOptimized | |
- then text "true" | |
- else text "false") | |
+ [ (text "language" , ftext dicuLanguage) | |
+ , (text "file" , ppr dicuFile) | |
+ , (text "producer" , doubleQuotes $ ftext dicuProducer) | |
+ , (text "isOptimized" , if dicuIsOptimized | |
+ then text "true" | |
+ else text "false") | |
+ , (text "runtimeVersion", text "0") | |
+ , (text "emissionKind" , text "FullDebug") | |
] | |
ppr (MetaDISubprogram {..}) = | |
specialMetadata "DISubprogram" | |
diff --git a/compiler/llvmGen/LlvmCodeGen.hs b/compiler/llvmGen/LlvmCodeGen.hs | |
index e67cf7610c..3f0df65dbc 100644 | |
--- a/compiler/llvmGen/LlvmCodeGen.hs | |
+++ b/compiler/llvmGen/LlvmCodeGen.hs | |
@@ -109,9 +109,9 @@ debugInfoGen :: MetaId -> ModLocation -> LlvmM () | |
debugInfoGen cuMeta location | |
= do dflags <- getDynFlags | |
fileMeta <- getMetaUniqueId | |
- subprogramsMeta <- getMetaUniqueId | |
dwarfVersionMeta <- getMetaUniqueId | |
debugInfoVersionMeta <- getMetaUniqueId | |
+ identMeta <- getMetaUniqueId | |
getMetaDecls >>= renderLlvm . ppLlvmMetas | |
renderLlvm $ ppLlvmMetas | |
[ MetaUnnamed fileMeta NotDistinct $ MetaDIFile | |
@@ -125,7 +125,9 @@ debugInfoGen cuMeta location | |
, dicuIsOptimized = optLevel dflags > 0 | |
} | |
, MetaNamed (fsLit "llvm.dbg.cu") NotDistinct [ cuMeta ] | |
- , MetaUnnamed subprogramsMeta NotDistinct $ MetaStruct [] | |
+ , MetaNamed (fsLit "llvm.ident") NotDistinct [ identMeta ] | |
+ , MetaUnnamed identMeta NotDistinct | |
+ $ MetaStruct [MetaStr $ fsLit "Glasgow Haskell Compiler"] | |
, MetaNamed (fsLit "llvm.module.flags") NotDistinct | |
[ dwarfVersionMeta | |
, debugInfoVersionMeta | |
diff --git a/compiler/llvmGen/LlvmCodeGen/Base.hs b/compiler/llvmGen/LlvmCodeGen/Base.hs | |
index 4f81702766..ad1e2c6d8b 100644 | |
--- a/compiler/llvmGen/LlvmCodeGen/Base.hs | |
+++ b/compiler/llvmGen/LlvmCodeGen/Base.hs | |
@@ -254,7 +254,6 @@ runLlvm dflags ver out us m = do | |
, envStackRegs = [] | |
, envUsedVars = [] | |
, envMetaDecls = [] | |
- , envSubprograms = [] | |
, envAliases = emptyUniqSet | |
, envVersion = ver | |
, envDynFlags = dflags | |
diff --git a/configure.ac b/configure.ac | |
index 0b65770b93..5ae1c6a0f4 100644 | |
--- a/configure.ac | |
+++ b/configure.ac | |
@@ -643,7 +643,7 @@ AC_SUBST([LibtoolCmd]) | |
# tools we are looking for. In the past, GHC supported a number of | |
# versions of LLVM simultaneously, but that stopped working around | |
# 3.5/3.6 release of LLVM. | |
-LlvmVersion=6.0 | |
+LlvmVersion=7.0 | |
AC_SUBST([LlvmVersion]) | |
sUPPORTED_LLVM_VERSION=$(echo \($LlvmVersion\) | sed 's/\./,/') | |
AC_DEFINE_UNQUOTED([sUPPORTED_LLVM_VERSION], ${sUPPORTED_LLVM_VERSION}, [The supported LLVM version number]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment