[Lldb-commits] [PATCH] D112439: normalize file path when searching the source map

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Oct 26 09:42:23 PDT 2021


JDevlieghere added inline comments.


================
Comment at: lldb/source/Target/PathMappingList.cpp:33-37
   ConstString NormalizePath(ConstString path) {
     // If we use "path" to construct a FileSpec, it will normalize the path for
     // us. We then grab the string and turn it back into a ConstString.
     return ConstString(FileSpec(path.GetStringRef()).GetPath());
   }
----------------
Can this function take a `StringRef` and return a `std::string` instead? The amount of roundtrips between `StringRef`s, `ConstString`s and `std::string`s is getting a bit out of hand.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D112439



More information about the lldb-commits mailing list