[Lldb-commits] [PATCH] D140056: [lldb] Report clang module build remarks

Dave Lee via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Dec 15 08:30:59 PST 2022


kastiglione added inline comments.


================
Comment at: lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp:82
   Log *m_log;
+  std::unique_ptr<Progress> m_current_progress_up;
+  std::vector<std::string> m_module_build_stack;
----------------
mib wrote:
> `Progress` makes use of RAII to complete the progress report event.
> 
> I think a local variable would be more suitable.
Since this is a callback, and the work being done doesn't happen in this function, I reasoned that that a local wouldn't match the semantics. Since this function is so short lived, the Progress would be immediately destructed and completed, but the work of building the module is not yet completed. Also, when an event is completed, the console text is cleared. As a result, the user doesn't see which module is currently building.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D140056



More information about the lldb-commits mailing list