[Lldb-commits] [PATCH] D153735: [lldb][LocateModuleCallback] Implement API, Python interface
    Alex Langford via Phabricator via lldb-commits 
    lldb-commits at lists.llvm.org
       
    Tue Jul 11 17:36:23 PDT 2023
    
    
  
bulbazord added inline comments.
================
Comment at: lldb/source/API/SBPlatform.cpp:664-689
+  if (platform_sp) {
+    if (callback) {
+      platform_sp->SetLocateModuleCallback(
+          [callback, callback_baton](const ModuleSpec &module_spec,
+                                     FileSpec &module_file_spec,
+                                     FileSpec &symbol_file_spec) {
+            SBModuleSpec module_spec_sb(module_spec);
----------------
Suggestion: Invert the conditions and use early returns. This function has quite a bit of nesting and I think the readability could be improved.
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D153735/new/
https://reviews.llvm.org/D153735
    
    
More information about the lldb-commits
mailing list