look for a corresponding file, since we're not going to read it anyway.
No observable behavior change (though we now avoid pointlessly trying to stat
or open a file named "-").
llvm-svn: 280436
off_t ExpectedSize,
time_t ExpectedModTime,
const FileEntry *&File) {
+ if (FileName == "-") {
+ File = nullptr;
+ return false;
+ }
+
// Open the file immediately to ensure there is no race between stat'ing and
// opening the file.
File = FileMgr.getFile(FileName, /*openFile=*/true, /*cacheFailure=*/false);
-
- if (!File && FileName != "-") {
+ if (!File)
return false;
- }
if ((ExpectedSize && ExpectedSize != File->getSize()) ||
(ExpectedModTime && ExpectedModTime != File->getModificationTime()))