oontvoo wrote:

> Based on the title of this PR I was expecting something slightly different, 
> so maybe I'm missing something. But if we want to make this an LLDB plugin 
> (which I agree we should ), I would expect the `PluginManager` to manage the 
> instance rather than the plugin doing itself. With the current patch, I don't 
> see how you're taking advantage of it being a plugin.
> 
> In the `PluginInterface`, I would expect a `Create` instance, something like 
> this:
.... 
> ```

This was what we were doing in the [initial 
PR](https://github.com/llvm/llvm-project/pull/98528/files#diff-20a2060f8e87c6742d6f2c7ae97e919f8485995d7808bd9fccbfbede697a9ec7)
  but Pavel had correctly pointed out that the architecture was unnecessarily 
"baroque". GIven there will be only one instance of the TelemetrManager at a 
time and that we will not be creating a new manager on the fly, none of those 
complex hooks are necessary.

Instead, we just need the downstream implemntation to register its instance 
(via the setInstance()).
Then the rest of (upstream) LLDB code, which uses the Telemetry, would just do 
`TelemetryManager::getInstance()`.



https://github.com/llvm/llvm-project/pull/126588
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to