Prevent possible modulemap collisions by making sure to always use the
looked-up filename, regardless of any possible overlays.
Upstreamed from apple#llvm-project
72cf785051fb1b3ef22eee4dd33366e41a275981. As well as preventing the
collisions as above, it also highlighted an issue with the recent change
to narrow the FileManager hack of setting the DirectoryEntry in
FileEntry to the most recently looked up directory
(3fda0edc51fd68192a30e302d45db081bb02d7f9). Specifically, it would cause
the incorrect path to be used in DoFrameworkLookup in a crash
reproducer:
- Crash reproducers have use-external-names set to false
- File->getFileEntry().getDir()->getName() would then be the *cached* path, not the just looked up one
- crash-vfs-umbrella-frameworks.m fails with this change since the correct path is now looked up and causes B to be loaded twice
This parameter could use a comment, even if it just points you to read the FIXME in the implementation.