Add enumeration values for DwarfVirtuality, DIFlags, and DIEmissionKind#180
Add enumeration values for DwarfVirtuality, DIFlags, and DIEmissionKind#180
Conversation
| , pure ("encoding:" <+> integral (dibtEncoding bt)) | ||
| , (("flags:" <+>) . integral) | ||
| <$> dibtFlags bt | ||
| , (\f -> "flags:" <+> (commas (text . show <$> f))) <$> dibtFlags bt |
There was a problem hiding this comment.
To my knowledge, this is the first time that we are relying on the output of a derived Show instance in the pretty-printing output. I think that this is fine, but we should add some comments to the relevant data type(s) saying that the names of the data constructors must match what is in LLVM exactly, as the pretty-printing code depends on this property.
| -- llvm-project/llvm/include/llvm/IR/{DebugInfoMetadata.h,DebugInfoFlags.def} | ||
| type DISPFlags = [DISPFlag] | ||
| data DISPFlag | ||
| = DISPFlagNonvirtual -- DISPFlagZero -- == 0 |
There was a problem hiding this comment.
Where is DISPFlagNonvirtual defined on the LLVM side? If I'm reading this correctly, shouldn't it be named DISPFlagZero?
| , pure ("isDefinition:" <+> ppBool (dispIsDefinition sp)) | ||
| , pure ("scopeLine:" <+> integral (dispScopeLine sp)) | ||
| , (("containingType:" <+>) . ppValMd' pp) <$> (dispContainingType sp) | ||
| , pure ("virtuality:" <+> integral (dispVirtuality sp)) |
There was a problem hiding this comment.
The virtuality field is now being displayed as spflags. Is this a change that was introduced in a particular LLVM version? Does the pretty-printing code need to do different things depending on the LLVM version?
| , pure ("align:" <+> integral (dictAlign ct)) | ||
| , (("offset:" <+>) . ppSizeOrOffsetValMd' pp) <$> dictOffset ct | ||
| , pure ("flags:" <+> integral (dictFlags ct)) | ||
| , pure ("flags:" <+> (commas (text . show <$> (dictFlags ct)))) |
There was a problem hiding this comment.
These parentheses are redundant:
| , pure ("flags:" <+> (commas (text . show <$> (dictFlags ct)))) | |
| , pure ("flags:" <+> (commas (text . show <$> dictFlags ct))) |
Similar comments apply to other uses of text . show <$> (...) introduced in this PR.
|
NB: This PR would fix #32. |
No description provided.