[PATCH]: Add a flag to the DWARF Compile Unit to indicate if it was compiled with ARC

John McCall rjmccall at apple.com
Mon May 13 16:50:54 PDT 2013


On May 13, 2013, at 4:48 PM, Adrian Prantl <aprantl at apple.com> wrote:
> On May 13, 2013, at 4:35 PM, John McCall <rjmccall at apple.com> wrote:
>> On May 13, 2013, at 4:32 PM, Adrian Prantl <aprantl at apple.com> wrote:
>>>>> I am happy to leave you and Adrian to decide the best representation as long as you agree that this is important to represent *somehow*. I was under the impression that that was in question.
>>>>> 
>>>> 
>>>> Nah, language features are important to represent in dwarf. :)
>>> 
>>> I’m happy to search for the best representation in DWARF.
>>> Going through John’s earlier examples, “weak” vs. “strong” can definitely be represented as an attribute.
>> 
>> I don't fully understand what "attribute" means here, but just to be clear, weak and strong are type qualifiers and need to be represented in the same basic way that "volatile" or "const" are.  They  are not merely properties of declared variables.
> 
> Sorry I was being fuzzy here: I meant that it could be attached to the debug info for that variable as an attribute. Looking at the way we handle CV-qualifiers, it will likely look like this:
> 
> 1: DW_TAG_variable
>     DW_AT_name(“myWeakVar”)
>     DW_AT_type(2) // __weak myType
> 
> 2: DW_TAG_weak_type
>    DW_AT_type(3) // myType
> 
> 3: ...

This seems fine, since it's part of the type.  I just wanted to make sure that it's not an attribute specific to declarations, because types like 'id __weak *' (that is, a pointer to a weak pointer to unspecified ObjC object) are completely valid.

John.



More information about the llvm-commits mailing list