From 28a5b769fe12220fe150d9d08c74b8cc37ac913e Mon Sep 17 00:00:00 2001 From: Ryan Scott Date: Thu, 28 Sep 2023 07:54:17 -0400 Subject: [PATCH 1/2] Add DebugInfoAssignID (added in LLVM 17) See https://github.com/llvm/llvm-project/commit/a2620e00ffa232a406de3a1d8634beeda86956fd for the LLVM commit in which this was introduced. This is part of an eventual fix for GaloisInc/llvm-pretty-bc-parser#258. --- src/Text/LLVM/AST.hs | 2 ++ src/Text/LLVM/PP.hs | 1 + 2 files changed, 3 insertions(+) diff --git a/src/Text/LLVM/AST.hs b/src/Text/LLVM/AST.hs index 94c4c00..2c22b3b 100644 --- a/src/Text/LLVM/AST.hs +++ b/src/Text/LLVM/AST.hs @@ -1408,6 +1408,8 @@ data DebugInfo' lab | DebugInfoImportedEntity (DIImportedEntity' lab) | DebugInfoLabel (DILabel' lab) | DebugInfoArgList (DIArgList' lab) + | DebugInfoAssignID + -- ^ Introduced in LLVM 17. deriving (Data, Eq, Functor, Generic, Generic1, Ord, Show, Typeable) type DebugInfo = DebugInfo' BlockLabel diff --git a/src/Text/LLVM/PP.hs b/src/Text/LLVM/PP.hs index e1395d0..275bfb3 100644 --- a/src/Text/LLVM/PP.hs +++ b/src/Text/LLVM/PP.hs @@ -957,6 +957,7 @@ ppDebugInfo' pp di = case di of DebugInfoImportedEntity diip -> ppDIImportedEntity' pp diip DebugInfoLabel dil -> ppDILabel' pp dil DebugInfoArgList args -> ppDIArgList' pp args + DebugInfoAssignID -> "!DIAssignID()" ppDebugInfo :: Fmt DebugInfo ppDebugInfo = ppDebugInfo' ppLabel From b36a2d72f0c2aae6d2c96a55a06eb255658c5a9a Mon Sep 17 00:00:00 2001 From: Ryan Scott Date: Tue, 3 Oct 2023 10:11:41 -0400 Subject: [PATCH 2/2] Bump llvmVlatest to 17 --- src/Text/LLVM/PP.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Text/LLVM/PP.hs b/src/Text/LLVM/PP.hs index 275bfb3..c0e2316 100644 --- a/src/Text/LLVM/PP.hs +++ b/src/Text/LLVM/PP.hs @@ -72,7 +72,7 @@ llvmV3_8 = 3 -- this is used for defaulting and otherwise reporting the maximum LLVM version -- known to be supported. llvmVlatest :: LLVMVer -llvmVlatest = 16 +llvmVlatest = 17 -- | The differences between various versions of the llvm textual AST.