HomePhabricator

[VFS] Add "expand tilde" argument to getRealPath.

Description

[VFS] Add "expand tilde" argument to getRealPath.

Add an optional argument to expand tildes in the path to mirror llvm's
implementation of the corresponding function.

Details

Committed
JDevlieghereNov 8 2018, 4:26 PM
Parents
rL346452: [hwasan] Remove dead code.
Branches
Unknown
Tags
Unknown

Event Timeline

I think this change was landed without review, and it's a complicated interface change, so I'm going to revert it for now.

I also have some specific concerns about the design:

  • this doesn't seem to be a per-filesystem concern. e.g. in an overlaid filesystem, whose responsibility is it to resolve ~? It's not clear this belongs in the virtualization layer at all.
  • implementing this is a substantial burden on VFSes, many of which (by their nature) live out-of-tree. It's not clear what the consequences of ignoring the parameter are, and what callers can expect.
  • use of optional-args in virtual methods would be nice to avoid
  • the use of boolean params like this in general doesn't scale well

Happy to help with review if you do want to move forward with this!