Shrink FileEntryRef to the size of a pointer, by having it directly
reference the StringMapEntry the same way that DirectoryEntryRef
does. This makes FileEntryRef::FileEntryRef private as a side effect
(FileManager is a friend!).
There are two helper types added within FileEntryRef:
- FileEntryRef::MapValue is the type stored in FileManager::SeenFileEntries. It's a replacement for SeenFileEntryOrRedirect, where the second pointer type has been changed from StringRef* to MapEntry* (see next bullet).
- FileEntryRef::MapEntry is the instantiation of StringMapEntry<> where MapValue is stored. This is what FileEntryRef has a pointer to, in order to grab the name in addition to the value.
It looks like this is too clever for gcc5.3: https://bugs.chromium.org/p/chromium/issues/detail?id=1143022
Ideas on how to work around that?