On incremental scan, caching an out-of-date PCM on the VFS layer causes each TU and each module to recompile the PCM again. This is huge performance problem. Stop caching ".pcm" files.
Reviewed By: Bigcheese
Differential Revision: https://reviews.llvm.org/D150615
SmallString<256> OwnedFilename;
StringRef Filename = Path.toStringRef(OwnedFilename);
+ if (Filename.endswith(".pcm"))
+ return getUnderlyingFS().status(Path);
+
llvm::ErrorOr<EntryRef> Result = getOrCreateFileSystemEntry(Filename);
if (!Result)
return Result.getError();
SmallString<256> OwnedFilename;
StringRef Filename = Path.toStringRef(OwnedFilename);
+ if (Filename.endswith(".pcm"))
+ return getUnderlyingFS().openFileForRead(Path);
+
llvm::ErrorOr<EntryRef> Result = getOrCreateFileSystemEntry(Filename);
if (!Result)
return Result.getError();