> Look at CompilerInstance. It has a number of IntrusiveRefCntPtr’s that exist 
> because we consistently ran into problems with other clients needing to hold 
> onto these core, cooperating objects for longer than the given 
> CompilerInstance. ASTUnit is one of the major culprits here, but it’s not the 
> only one.

Yes. I am not suggesting for CompilerInstance to own the FS. That
would be really odd.

>> But is it not the case that
>> * A clang process will always use a single FS.
>> * The decision as to which to use can happen just after parsing the
>> command line arguments?
>
>
> We may spawn a number of Clang invocations within the same thread to build 
> modules from headers, and they all need to share the same FS.

Which perfectly matches to having a FS being constructed before any
CompilerInstance and each CompilerInstance has a pointer to the same
FS. In other words, a FS is a singleton in a clang process, no?

Cheers,
Rafael

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

Reply via email to