On Oct 11, 2012, at 11:11 , Vassil Vassilev <[email protected]> wrote:

> Hi,
> On 10/11/12 7:21 PM, Jordan Rose wrote:
>> I don't know enough about this to make good comments, but rather than have 
>> "isMultiplex" as the field in Sema, why not call it "isOwned"? That's more 
>> in line with some of our other delegate-pattern uses, and it keeps it from 
>> being a temptation to start abusing the field. We could also some day in the 
>> future allow Sema to take ownership of arbitrary external sources as well, 
>> though that's clearly not a goal right now.
> I agree that Sema should take the ownership it's external source (or at least 
> we it should be specified with a flag while setting it). For example the 
> ASTContext owns its ExternalASTSource.
> 
> My original intent was to try to keep the semantics (which is was not trivial 
> for most of the reimplemented routines) of the existing code and extend it so 
> that it can fit to our use case.
> 
> Otherwise I agree and I will rename the flag if we decide to keep it…

Ah, I see…the MultiplexExternalSource doesn't combine 2 sources, it combines N 
sources, and so addExternalSource needs to know if there's already a multiplex 
source in place. Okay, I see your point; keeping the flag as "isMultiplex" is 
fine.

Jordan
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to