Skip to content

Commit

Permalink
Add alignment to DILocalVariable
Browse files Browse the repository at this point in the history
This paves the way for an eventual fix to
GaloisInc/llvm-pretty-bc-parser#217.
  • Loading branch information
RyanGlScott committed Apr 10, 2023
1 parent c30d738 commit a7072bd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Text/LLVM/AST.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1353,6 +1353,8 @@ data DILocalVariable' lab = DILocalVariable
, dilvType :: Maybe (ValMd' lab)
, dilvArg :: Word16
, dilvFlags :: DIFlags
, dilvAlignment :: Maybe Word32
-- ^ Introduced in LLVM 4.
} deriving (Data, Eq, Functor, Generic, Generic1, Ord, Show, Typeable)

type DILocalVariable = DILocalVariable' BlockLabel
Expand Down
1 change: 1 addition & 0 deletions src/Text/LLVM/PP.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1156,6 +1156,7 @@ ppDILocalVariable' pp lv = "!DILocalVariable"
, (("type:" <+>) . ppValMd' pp) <$> (dilvType lv)
, pure ("arg:" <+> integral (dilvArg lv))
, pure ("flags:" <+> integral (dilvFlags lv))
, (("align:" <+>) . integral) <$> dilvAlignment lv
])

ppDILocalVariable :: LLVM => DILocalVariable -> Doc
Expand Down

0 comments on commit a7072bd

Please sign in to comment.