-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add tag field to METADATA_TEMPLATE_VALUE #43
Projects
Comments
Okay, this particular node has an especially twisted history.
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. |
langston-barrett
added a commit
to langston-barrett/llvm-pretty-bc-parser
that referenced
this issue
Dec 7, 2018
Text copied from GaloisInc/llvm-pretty#43: ----------------------------------------------------------------- Okay, this particular node has an especially twisted history. 0. [Feb 12, 2015](llvm-mirror/llvm@8921bbc): `MDTemplateTypeParameter` lands. It's fields have type i. `Num` ii. `Maybe PValMd` iii. `MDString` iv. `Maybe PValMd` v. `Maybe PValMd` 1. [Feb 18, 2015](llvm-mirror/llvm@eac950e ): The last field, "scope", was dropped, and the type of the second field was made into a `MDString`. 2. [Apr 23, 2016](llvm-mirror/llvm@de74840): Removal of MDString-based references (see GaloisInc#39). Third field is made into a `DITypeRef`. Interestingly, at no point in this process does the field only have three fields, [as it does in the AST](https://github.com/elliottt/llvm-pretty/blob/de881be8e97bc085150d816d359599d75ad3ac9b/src/Text/LLVM/AST.hs#L1100). 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.
langston-barrett
added a commit
to langston-barrett/llvm-pretty-bc-parser
that referenced
this issue
Dec 7, 2018
Text copied from GaloisInc/llvm-pretty#43: ----------------------------------------------------------------- Okay, this particular node has an especially twisted history. 0. [Feb 12, 2015](llvm-mirror/llvm@8921bbc): `MDTemplateTypeParameter` lands. It's fields have type i. `Num` ii. `Maybe PValMd` iii. `MDString` iv. `Maybe PValMd` v. `Maybe PValMd` 1. [Feb 18, 2015](llvm-mirror/llvm@eac950e): The last field, "scope", was dropped, and the type of the second field was made into a `MDString`. 2. [Apr 23, 2016](llvm-mirror/llvm@de74840): Removal of MDString-based references (see GaloisInc#39). Third field is made into a `DITypeRef`. Interestingly, at no point in this process does the field only have three fields, [as it does in the AST](https://github.com/elliottt/llvm-pretty/blob/de881be8e97bc085150d816d359599d75ad3ac9b/src/Text/LLVM/AST.hs#L1100). 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.
langston-barrett
added a commit
to langston-barrett/llvm-pretty-bc-parser
that referenced
this issue
Dec 7, 2018
Text copied from GaloisInc/llvm-pretty#43: ----------------------------------------------------------------- Okay, this particular node has an especially twisted history. 0. [Feb 12, 2015](llvm-mirror/llvm@8921bbc): `MDTemplateTypeParameter` lands. It's fields have type i. `Num` ii. `Maybe PValMd` iii. `MDString` iv. `Maybe PValMd` v. `Maybe PValMd` 1. [Feb 18, 2015](llvm-mirror/llvm@eac950e): The last field, "scope", was dropped, and the type of the second field was made into a `MDString`. 2. [Apr 23, 2016](llvm-mirror/llvm@de74840): Removal of MDString-based references (see GaloisInc#39). Third field is made into a `DITypeRef`. Interestingly, at no point in this process does the field only have three fields, [as it does in the AST](https://github.com/elliottt/llvm-pretty/blob/de881be8e97bc085150d816d359599d75ad3ac9b/src/Text/LLVM/AST.hs#L1100). 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.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
The text was updated successfully, but these errors were encountered: