[PATCH] D30668: Add llvm::sys::fs::real_path

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 9 03:58:56 PST 2017


@mgorny: it's also worth noting that I'm not adding any new functionality
(well, aside from tilde expansion). openFileForRead already provides
realpath functionality. I'm just providing a wrapper over it, as well as
making it work correctly on windows for directories
On Thu, Mar 9, 2017 at 1:40 AM Pavel Labath via Phabricator <
reviews at reviews.llvm.org> wrote:

> labath accepted this revision.
> labath added a comment.
> This revision is now accepted and ready to land.
>
> looks good to me, thank you for the patience. BTW I accidentally stumbled
> onto this
> https://docs.python.org/2/library/os.path.html#os.path.expanduser
> yesterday, so it looks like supporting tilde expressions on windows is not
> without precedent.
>
> @mgorny: The immediate motivation is lowering similar code for this in
> lldb. I am not sure what are all the reasons lldb needs it in the first
> place, but I can totally believe that it is overusing this (OTOH, lldb only
> consumes paths, it does not produce them, so it's probably not that
> critical).  Still, maybe this is another reason to have ~ logic separate
> from real_path stuff -- then one could still support home directory
> expansion where it makes sense, without forcing full path resolution.
>
>
> https://reviews.llvm.org/D30668
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170309/118d5796/attachment.html>


More information about the llvm-commits mailing list