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

Eric Christopher echristo at gmail.com
Tue May 14 14:09:03 PDT 2013


I'm down with that. About the only thing I might wonder is if we'd
like a DW_AT_APPLE_ObjC_flags versus an actual flag, but if it's on
the subroutine and as soon as darwin can move to dwarf4 then it'll be
less of an issue (DW_FORM_flag_present).

Thoughts?

-eric

On Tue, May 14, 2013 at 1:57 PM, Adrian Prantl <aprantl at apple.com> wrote:
>
> On May 14, 2013, at 1:52 PM, Bob Wilson <bob.wilson 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.
>>>
>>> But I think that the last three (especially the “monitor retain/release events”) cases actually do warrant at least a per-function "ARC-enabled" attribute. But since we can only turn on ARC on a per-compilation-unit basis we might as well stick with the cu-wide flag and save some space.
>>> Let me know if you see an opportunity to break this down into smaller attributes that I missed.
>>
>> We're actively working on using the per-function attribute to control whether ARC is used.  That is important for LTO.
>
> Ok, that sounds like a compelling argument for making this a flag to DW_TAG_subprogram then.
>
> -- adrian




More information about the llvm-commits mailing list