[PATCH] Don't set ObjCAutoRefCount in original CI

Argyrios Kyrtzidis kyrtzidis at apple.com
Tue Jul 15 11:36:40 PDT 2014


> On Jul 15, 2014, at 11:18 AM, Alp Toker <alp at nuanti.com> wrote:
> 
> 
> On 15/07/2014 21:01, Argyrios Kyrtzidis wrote:
>>> On Jul 6, 2014, at 3:35 PM, Alp Toker <alp at nuanti.com> wrote:
>>> 
>>> Hi Fariborz,
>>> 
>>> As far as I can tell the original CI is immutable at this point, so changing it isn't needed or desirable at this point. OK to remove this line? No change in test results.
>> Looks like arcmt::ModifyAction will modify the original CI so that after the file is modified in-place it will be built with ARC enabled.
>> Why do you need the change ?
> 
> It came up when validating LangOptions reference counting:
> 
>  origCI.getLangOpts()->ObjCAutoRefCount = true;
> 
> In library usage I believe the LangOpts can have multiple owners, yet it's modified directly here which potentially affects unrelated compilations.

On a related note I don’t like that LangOpts is shared like this, I’d prefer that CompilerInvocation has its own copy. Not sure why we have it reference counted.

> 
> I've been hoping that this line might simply be a leftover superseded by some other mechanism, given it has no effect on test results. if it's still valid, do you have a test you could check in to get coverage?

AFAIK in-place modification is not used, so go ahead and make the change and at some point we will remove this mechanism.

> 
> 
> 
> 
>> 
>>> Alp.
>>> 
>>> -- 
>>> http://www.nuanti.com
>>> the browser experts
>>> 
>>> <ObjCAutoRefCount.patch>_______________________________________________
>>> cfe-commits mailing list
>>> cfe-commits at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
> 
> -- 
> http://www.nuanti.com
> the browser experts
> 





More information about the cfe-commits mailing list