[Lldb-commits] [PATCH] D100965: [lldb] Refactor (FileSpec+Line) to SourceLocationSpec (NFCI)

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Apr 21 08:45:50 PDT 2021


JDevlieghere added a comment.

Nice, it's great to see functions taking less arguments for a change ;-)



================
Comment at: lldb/include/lldb/Breakpoint/BreakpointResolverFileLine.h:12-14
 #include "lldb/Breakpoint/BreakpointResolver.h"
 
+#include "lldb/Utility/SourceLocationSpec.h"
----------------



================
Comment at: lldb/include/lldb/Breakpoint/BreakpointResolverFileLine.h:32
+  BreakpointResolverFileLine(const lldb::BreakpointSP &bkpt,
+                             const SourceLocationSpec location_spec,
+                             lldb::addr_t offset, bool check_inlines,
----------------
Was this meant to be a const ref? There's no point in making objects passed by value const, as they're already copied in and this just means that if the function wants to modify them, they have to make a second copy while the function already has its own copy. 


================
Comment at: lldb/include/lldb/Core/AddressResolverFileLine.h:45-48
+  SourceLocationSpec m_src_location_spec; // This contains the file spec and
+                                          // line we are looking for.
   bool m_inlines; // This determines whether the resolver looks for inlined
                   // functions or not.
----------------



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D100965



More information about the lldb-commits mailing list