Skip to content

Commit

Permalink
Fix issue #124: do not emit DIDerivedType dwarfAddressSpace if the va…
Browse files Browse the repository at this point in the history
…lue is 0.
  • Loading branch information
kquick committed Aug 9, 2023
1 parent 7f5631f commit 98fb722
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Text/LLVM/PP.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1107,7 +1107,10 @@ ppDIDerivedType' pp dt = "!DIDerivedType"
, pure ("offset:" <+> integral (didtOffset dt))
, pure ("flags:" <+> integral (didtFlags dt))
, (("extraData:" <+>) . ppValMd' pp) <$> (didtExtraData dt)
, (("dwarfAddressSpace:" <+>) . integral) <$> didtDwarfAddressSpace dt
, case didtDwarfAddressSpace dt of
Nothing -> Nothing
Just 0 -> Nothing
Just s -> Just $ "dwarfAddressSpace:" <+> integral s
, (("annotations:" <+>) . ppValMd' pp) <$> (didtAnnotations dt)
])

Expand Down

0 comments on commit 98fb722

Please sign in to comment.