[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
Tue Feb 5 01:56:52 PST 2019
labath accepted this revision.
labath added a comment.
This revision is now accepted and ready to land.
If Greg is happy, then LGTM from me too.
================
Comment at: source/Target/PathMappingList.cpp:223
+
+ if (prefix_ref == ".") {
+ prefix_is_relative = true;
----------------
jingham wrote:
> clayborg wrote:
> > We are we finding a "." in any path now? I thought we normalized those all out? Can a PathMappingList contain non normalized paths? if so, can't we just normalize them as they go into the list?
> That's the incoming path from the path maps. You can't normalize just a "." from the path mappings or it would become "" and we don't really know what that means. These are currently left as ".". I think that's right.
FileSpec::IsValid() considers "" to be an invalid path. Most utilities/APIs do the same. The llvm api are a bit conflicted here though as sometimes they do consider "" to be invalid, but otoh they will happilly normalize "." to "".
Bottom line: I also think that the current FileSpec behavior is correct.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57552/new/
https://reviews.llvm.org/D57552
More information about the lldb-commits
mailing list