labath accepted this revision.
labath added inline comments.

================
Comment at: lldb/source/Plugins/Trace/intel-pt/TraceIntelPT.cpp:61
+                                     const std::vector<TargetSP> &targets) {
+  TraceSP trace_instance(new TraceIntelPT(pt_cpu, targets));
+  for (const TargetSP &target_sp : targets)
----------------
wallace wrote:
> labath wrote:
> > auto trace_instance = std::make_shared<TraceIntelPT>(...)
> I can't do this because the constructor is private (specifically to 
> std::shared_ptr).
> I want to have this method as the main way to create instances because I need 
> to use shared_ptr of this instance to set up everything correctly, and I 
> can't do it from the constructor itself.
> I've checked ways to make std::make_shared<TraceIntelPT>(...), but it looks 
> like too much code that outweighs the benefit of the fancy allocator.
Ah, cool. Sorry for the noise.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D88769/new/

https://reviews.llvm.org/D88769

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to