NagyDonat wrote: > It will surprise me that `MapExtDefNamesConsumer` operate on a global shared > state. At the same time I believe it is not much more complicated to keep > state of each `MapExtDefNamesConsumer` private and ephemeral, and aggregate > them into a local variable in `HandleFiles`. Alternatively, they can hold an > explicit pointer to the shared collection local in `HandleFiles`.
I strongly agree with this suggestion. The simpler approach is probably the second one (declaring it as a local in `HandleFiles` and passing a pointer to that local variable to each `MapExtDefNamesConsumer` instance). In the other approach we would need to return the weak and non-weak sets separately, and the aggregation would be a bit complex (but also completely manageable). https://github.com/llvm/llvm-project/pull/222010 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
