[Lldb-commits] [PATCH] D61779: FuncUnwinders: General clean up and optimization

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri May 10 07:30:58 PDT 2019


labath marked an inline comment as done.
labath added inline comments.


================
Comment at: include/lldb/Symbol/FuncUnwinders.h:117
+  class LazyPlan {
+    lldb::UnwindPlanSP m_plan_sp;
+
----------------
clayborg wrote:
> maybe use:
> 
> ```
> llvm::Optional<lldb::UnwindPlanSP> m_plan_sp;
> ```
> 
> Then just check if it has no value, and if so compute and set it either to a valid shared pointer or an empty one?
That would work, but it would increase the size of the FuncUnwinders struct by about 80 bytes (8 bytes for each LazyPlan object). I can do that, but given that "uncomputed value" trick is internal to the class and does not leak out or affect the implementation, it seemed like a worthwhile optimization to me.


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

https://reviews.llvm.org/D61779





More information about the lldb-commits mailing list