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

Authored by vsapsai on Wed, Nov 7, 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

Diff Detail

Repository
rL LLVM
vsapsai created this revision.Wed, Nov 7, 5:20 PM
bruno added a comment.Thu, Nov 8, 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.

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

LGTM

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