[Lldb-commits] [PATCH] D57552: Handle "." in target.source-map in PathMapListing::FindFiles

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Feb 1 04:44:50 PST 2019


labath added inline comments.
Herald added a subscriber: lldb-commits.


================
Comment at: packages/Python/lldbsuite/test/functionalities/source-map/TestTargetSourceMap.py:32-34
+        #bp = target.BreakpointCreateByLocation(src_path, 2)
+        #self.assertTrue(bp.GetNumLocations() == 1,
+        #                "make sure breakpoint was resolved with map")
----------------
Is this intentional?


================
Comment at: source/Target/PathMappingList.cpp:207
+    
+    if (orig_path.size() > 0) {
+      llvm::StringRef orig_ref(orig_path);
----------------
`!orig_path.empty()`?


================
Comment at: source/Target/PathMappingList.cpp:232
+          llvm::StringRef orig_remaining = orig_ref;
+          if (prefix_ref.size() == 0 
+              || orig_remaining.consume_front(prefix_ref)) {
----------------
The `size()` is actually unneeded as `consume_front` is trivially true for an empty StringRef.


Repository:
  rLLDB LLDB

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

https://reviews.llvm.org/D57552





More information about the lldb-commits mailing list