From 7ab7ac98eab93b6a84472fb040621adf0b150297 Mon Sep 17 00:00:00 2001 From: Ryan Scott Date: Mon, 13 Sep 2021 03:12:55 -0400 Subject: [PATCH] Add dict{Associated,Allocated,Rank} fields introduced in LLVM 12 (#83) The `associated` and `allocated` fields were introduced in https://reviews.llvm.org/D83544, and the `rank` field was introduced in https://reviews.llvm.org/D89141. --- src/Text/LLVM/AST.hs | 3 +++ src/Text/LLVM/PP.hs | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/Text/LLVM/AST.hs b/src/Text/LLVM/AST.hs index 9b41ff4..3de487b 100644 --- a/src/Text/LLVM/AST.hs +++ b/src/Text/LLVM/AST.hs @@ -1221,6 +1221,9 @@ data DICompositeType' lab = DICompositeType , dictIdentifier :: Maybe String , dictDiscriminator :: Maybe (ValMd' lab) , dictDataLocation :: Maybe (ValMd' lab) + , dictAssociated :: Maybe (ValMd' lab) + , dictAllocated :: Maybe (ValMd' lab) + , dictRank :: Maybe (ValMd' lab) } deriving (Data, Eq, Functor, Generic, Generic1, Ord, Show, Typeable) type DICompositeType = DICompositeType' BlockLabel diff --git a/src/Text/LLVM/PP.hs b/src/Text/LLVM/PP.hs index 7191a81..114c6b6 100644 --- a/src/Text/LLVM/PP.hs +++ b/src/Text/LLVM/PP.hs @@ -992,6 +992,9 @@ ppDICompositeType' pp ct = "!DICompositeType" , (("identifier:" <+>) . doubleQuotes . text) <$> (dictIdentifier ct) , (("discriminator:" <+>) . ppValMd' pp) <$> (dictDiscriminator ct) + , (("associated:" <+>) . ppValMd' pp) <$> (dictAssociated ct) + , (("allocated:" <+>) . ppValMd' pp) <$> (dictAllocated ct) + , (("rank:" <+>) . ppValMd' pp) <$> (dictRank ct) ]) ppDICompositeType :: LLVM => DICompositeType -> Doc