clayborg added inline comments.

================
Comment at: lldb/include/lldb/Target/PathMappingList.h:75
   ///
+  /// \param[in] check_filesystem
+  ///     If \b true, besides matching \p path with the remapping rules, this 
tries
----------------
 "only_if_exists" be a better name for "check_filesystem"


================
Comment at: lldb/source/Target/PathMappingList.cpp:168
 llvm::Optional<FileSpec>
-PathMappingList::RemapPath(llvm::StringRef path) const {
+PathMappingList::RemapPath(llvm::StringRef path, bool check_filesystem) const {
   if (m_pairs.empty() || path.empty())
----------------
Would "only_if_exists" be a better name for "check_filesystem"?


================
Comment at: lldb/source/Target/PathMappingList.cpp:217
 llvm::Optional<FileSpec> PathMappingList::FindFile(const FileSpec &orig_spec) 
const {
-  if (auto remapped = RemapPath(orig_spec.GetPath()))
-    if (FileSystem::Instance().Exists(*remapped))
+  if (auto remapped = RemapPath(orig_spec.GetPath(), 
/*check_filesystem=*/true))
       return remapped;
----------------
 "only_if_exists" be a better name for "check_filesystem


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D106723

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to