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

Med Ismail Bennani via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Dec 15 04:13:14 PST 2022


mib 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;
----------------
`Progress` makes use of RAII to complete the progress report event.

I think a local variable would be more suitable.


================
Comment at: lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp:198-202
+    m_current_progress_up.reset(nullptr);
+    m_current_progress_up.reset(new Progress(
+        llvm::formatv("Currently building module {0}", module_name)));
+    LLDB_LOG(log, "Building Clang module {0} as {1}", module_name,
+             module_file_name);
----------------
I guess this could be refactored in a lambda function


================
Comment at: lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp:209-212
+    m_current_progress_up.reset(nullptr);
+    m_current_progress_up.reset(new Progress(
+        llvm::formatv("Currently building module {0}", parent_module_name)));
+    LLDB_LOG(log, "Finished building Clang module {0}", module_name);
----------------
same here


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