[PATCH] D59491: Fix relative thin archive path handling
Owen Reynolds via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 26 11:06:38 PDT 2019
gbreynoo added a comment.
Hi Rui, thanks for the feedback. I'm unsure what changes would better fit what we have outlined in past comments:
Suggested implementation:
Canonicalize both P1 <https://reviews.llvm.org/P1> and P2 <https://reviews.llvm.org/P2> by converting backslashes to slashes(including calls to remove_dots).
Remove common prefixes from P1 <https://reviews.llvm.org/P1> and P2 <https://reviews.llvm.org/P2>
Count the number of slashes in P1 <https://reviews.llvm.org/P1>. Let N be that number.
Concatenate "../../../../...." (repeated N times) and P2 <https://reviews.llvm.org/P2>. This is the result.
My understanding of the current implementation:
Calls to getDotlessAbsolute path to canonicalize, includes call to remove_dots()
In cases where this isnt possible return P2 <https://reviews.llvm.org/P2>
Remove common prefixes using two iterators
Construct a path with the number of "../" required using one iterator, I thought this would be more efficient than constructing the remaining P1 <https://reviews.llvm.org/P1> path to count slashes
Append the remaining P2 <https://reviews.llvm.org/P2> path using the iterator.
Any further suggestions would be appreciated,
Thanks
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59491/new/
https://reviews.llvm.org/D59491
More information about the llvm-commits
mailing list