Forward declare FileEntry and DirectoryEntry in Module.h
FileManager.h is an expensive header (~350ms for me in isolation), so try to do without it. Notably, we need to avoid checking the alignment of FileEntry, which happens for DenseMap<FileEntry*> and PointerUnion<FileEntry*>. I adjusted the code to avoid PointerUnion, and moved the DenseMap insertion to the .cpp file. Globally, this only saved about ~17 includes of the related headers because SourceManager.h still includes FileManager.h, and it is more popular than Module.h.
Loading
Please sign in to comment