This is an archive of the discontinued LLVM Phabricator instance.

[VFS] Implement `RedirectingFileSystem::getRealPath`.
ClosedPublic

Authored by vsapsai on Nov 7 2018, 5:20 PM.

Details

Summary

It fixes the case when Objective-C framework is added as a subframework
through a symlink. When parent framework infers a module map and fails
to detect a symlink, it would add a subframework as a submodule. And
when we parse module map for the subframework, we would encounter an
error like

error: umbrella for module 'WithSubframework.Foo' already covers this directory

By implementing getRealPath "an egregious but useful hack" in
ModuleMap::inferFrameworkModule works as expected.

rdar://problem/45821279

Event Timeline

vsapsai created this revision.Nov 7 2018, 5:20 PM
bruno added a comment.Nov 8 2018, 12:00 PM

Hi Volodymyr. Does this behavior changed after your VFS fallback change?

Hi Volodymyr. Does this behavior changed after your VFS fallback change?

D50539 didn't change RedirectingFileSystem behavior regarding real paths. But for -ivfsoverlay it started using nested RedirectingFileSystem instead of OverlayFileSystem. And OverlayFileSystem [implements getRealPath](https://clang.llvm.org/doxygen/VirtualFileSystem_8cpp_source.html#l00390).

bruno accepted this revision.Nov 15 2018, 1:26 PM

LGTM

This revision is now accepted and ready to land.Nov 15 2018, 1:26 PM
This revision was automatically updated to reflect the committed changes.