summaryrefslogtreecommitdiffstats
path: root/lib/Frontend/CacheTokens.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Frontend/CacheTokens.cpp')
-rw-r--r--lib/Frontend/CacheTokens.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Frontend/CacheTokens.cpp b/lib/Frontend/CacheTokens.cpp
index 702c1d0..c845d56 100644
--- a/lib/Frontend/CacheTokens.cpp
+++ b/lib/Frontend/CacheTokens.cpp
@@ -64,7 +64,7 @@ public:
PTHEntryKeyVariant(struct stat* statbuf, const char* path)
: Path(path), Kind(IsDE), StatBuf(new struct stat(*statbuf)) {}
- PTHEntryKeyVariant(const char* path)
+ explicit PTHEntryKeyVariant(const char* path)
: Path(path), Kind(IsNoExist), StatBuf(0) {}
bool isFile() const { return Kind == IsFE; }
@@ -513,7 +513,7 @@ public:
int result = StatSysCallCache::stat(path, buf);
if (result != 0) // Failed 'stat'.
- PM.insert(path, PTHEntry());
+ PM.insert(PTHEntryKeyVariant(path), PTHEntry());
else if (S_ISDIR(buf->st_mode)) {
// Only cache directories with absolute paths.
if (!llvm::sys::Path(path).isAbsolute())
OpenPOWER on IntegriCloud