Ben Langmuir via llvm-dev
2016-Feb-19 15:35 UTC
[llvm-dev] Question about __NSConstantString and __NSConstantString_tag
> On Feb 19, 2016, at 7:16 AM, Brad King <brad.king at kitware.com> wrote: > > On 02/18/2016 05:51 PM, Michka Popoff wrote: >> Our problem is that the AST contains some declarations which were not there before. > [snip] >> __NSConstantString and __NSConstantString_tag are now exposed. > [snip] >> Maybe someone could enlighten us about this change. >> If it’s not a bug, we would like to know more about these structures.This struct/typedef are for __builtin___CFStringMakeConstantString (and the NS variant) and are predefined to make these builtins behave correctly with modules. Adding them was intentional :-)> > To clarify, this is not so much about the appearance of new builtins > but that the structure has fields with no name. Other builtin > structures like __va_list_tag have names on their fields. FieldDecl > derives (indirectly) from NamedDecl. > > Our concern is that AST processing tools expect to find a name on > fields, and the changes in question introduced fields without names. > Can they be given names, if only for AST consistency?Yes, sounds like a good idea. I’ll take a look at this later today.> > Thanks, > -Brad >
Brad King via llvm-dev
2016-Feb-25 15:49 UTC
[llvm-dev] Question about __NSConstantString and __NSConstantString_tag
On 02/19/2016 10:35 AM, Ben Langmuir wrote:>> On Feb 19, 2016, at 7:16 AM, Brad King wrote: >> [snip] >>> __NSConstantString and __NSConstantString_tag are now exposed. >> To clarify, this is not so much about the appearance of new builtins >> but that the structure has fields with no name. Other builtin >> structures like __va_list_tag have names on their fields. FieldDecl >> derives (indirectly) from NamedDecl. >> >> Our concern is that AST processing tools expect to find a name on >> fields, and the changes in question introduced fields without names. >> Can they be given names, if only for AST consistency? > > Yes, sounds like a good idea. I’ll take a look at this later today.Here is a patch that adds the field names. Thanks, -Brad -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-Populate-field-names-on-builtin-struct-underlying-__.patch Type: text/x-diff Size: 1831 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160225/7340db07/attachment.patch>
Ben Langmuir via llvm-dev
2016-Feb-25 16:41 UTC
[llvm-dev] Question about __NSConstantString and __NSConstantString_tag
> On Feb 25, 2016, at 7:49 AM, Brad King <brad.king at kitware.com> wrote: > > On 02/19/2016 10:35 AM, Ben Langmuir wrote: >>> On Feb 19, 2016, at 7:16 AM, Brad King wrote: >>> [snip] >>>> __NSConstantString and __NSConstantString_tag are now exposed. >>> To clarify, this is not so much about the appearance of new builtins >>> but that the structure has fields with no name. Other builtin >>> structures like __va_list_tag have names on their fields. FieldDecl >>> derives (indirectly) from NamedDecl. >>> >>> Our concern is that AST processing tools expect to find a name on >>> fields, and the changes in question introduced fields without names. >>> Can they be given names, if only for AST consistency? >> >> Yes, sounds like a good idea. I’ll take a look at this later today. > > Here is a patch that adds the field names. > > Thanks, > -Brad > > <0001-Populate-field-names-on-builtin-struct-underlying-__.patch>I’m really sorry I totally forgot about this! Thanks for the patch. Committed as r261887
Seemingly Similar Threads
- Question about __NSConstantString and __NSConstantString_tag
- Question about __NSConstantString and __NSConstantString_tag
- Question about __NSConstantString and __NSConstantString_tag
- Question about __NSConstantString and __NSConstantString_tag
- [LLVMdev] [cfe-dev] LLVM 3.0rc3 Testing Beginning