Skip to content

Commit

Permalink
Add dict{Associated,Allocated,Rank} fields introduced in LLVM 12 (Gal…
Browse files Browse the repository at this point in the history
…oisInc#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.
  • Loading branch information
RyanGlScott authored Sep 13, 2021
1 parent 960f32c commit 7ab7ac9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Text/LLVM/AST.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions src/Text/LLVM/PP.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7ab7ac9

Please sign in to comment.