summaryrefslogtreecommitdiff
path: root/lib/Basic/FileSystemStatCache.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2018-08-02 17:33:11 +0000
committerDimitry Andric <dim@FreeBSD.org>2018-08-02 17:33:11 +0000
commitc7e70c433efc6953dc3888b9fbf9f3512d7da2b0 (patch)
tree27425930fc0c91650a7f3527fcac8e0f92907b90 /lib/Basic/FileSystemStatCache.cpp
parent486754660bb926339aefcf012a3f848592babb8b (diff)
Diffstat (limited to 'lib/Basic/FileSystemStatCache.cpp')
-rw-r--r--lib/Basic/FileSystemStatCache.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Basic/FileSystemStatCache.cpp b/lib/Basic/FileSystemStatCache.cpp
index ebee32670e0a5..f5856cb6542a8 100644
--- a/lib/Basic/FileSystemStatCache.cpp
+++ b/lib/Basic/FileSystemStatCache.cpp
@@ -95,17 +95,17 @@ bool FileSystemStatCache::get(StringRef Path, FileData &Data, bool isFile,
// If the path doesn't exist, return failure.
if (R == CacheMissing) return true;
-
+
// If the path exists, make sure that its "directoryness" matches the clients
// demands.
if (Data.IsDirectory != isForDir) {
// If not, close the file if opened.
if (F)
*F = nullptr;
-
+
return true;
}
-
+
return false;
}
@@ -120,7 +120,7 @@ MemorizeStatCalls::getStat(StringRef Path, FileData &Data, bool isFile,
// entries).
if (Result == CacheMissing)
return Result;
-
+
// Cache file 'stat' results and directories with absolutely paths.
if (!Data.IsDirectory || llvm::sys::path::is_absolute(Path))
StatCalls[Path] = Data;