vsk added inline comments.

================
Comment at: lldb/include/lldb/Symbol/Function.h:258
+
+using CallSiteParameterArray = std::unique_ptr<std::vector<CallSiteParameter>>;
+
----------------
vsk wrote:
> aprantl wrote:
> > vsk wrote:
> > > grandinj wrote:
> > > > the way this is being used seems to indicate it can be 
> > > >    std::vector<CallSiteParameter>
> > > > no need for unique_ptr
> > > That's a totally fair point. The reason I've used unique_ptr here is to 
> > > save space in CallEdge in the common case, where no call site information 
> > > is loaded for the function. Call site info is lazily parsed, so we'd like 
> > > to take a minimal memory hit for functions that aren't in a backtrace.
> > > 
> > > Also, note that using a pointer allows for a further PointerIntPair 
> > > memory optimization mentioned below.
> > Can you document this decision up there?
> Done. And, thanks @grandinj for pointing this out, I dug a bit more and found 
> that we're *not* doing this in Function for the CallEdge vector, but probably 
> should be. Added a TODO there.
Actually, there's no need to do this in both CallEdge and Function: edges are 
parsed lazily, but parameters aren't. Let's just leave a note about this in 
Function.


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

https://reviews.llvm.org/D67376



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

Reply via email to