Closed langston-barrett closed 5 years ago
Okay, this particular node has an especially twisted history.
MDTemplateTypeParameter
lands. It's fields have type
i. Num
ii. Maybe PValMd
iii. MDString
iv. Maybe PValMd
v. Maybe PValMd
MDString
.DITypeRef
.Interestingly, at no point in this process does the field only have three fields, as it does in the AST.
The biggest flaw I'm seeing is that the first field of the record is not a reference, but it is looked up as if it is one. This is causing the parser to crash, because the reference is not defined.
This type only has three fields: https://github.com/elliottt/llvm-pretty/blob/master/src/Text/LLVM/AST.hs#L1096. It is supposed to have four: https://github.com/llvm-mirror/llvm/blob/a3fa104c8c41ae015b8d4c677bc7fc5b88957fe1/lib/Bitcode/Reader/BitcodeReader.cpp#L1517
There is no associated commit ID, it looks like it always had the tag field.
Tag
4
MDNode