Don't rely on implicit conversion
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97916 91177308-0d34-0410-b5e6-96231b3b80d8
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 @@
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 @@
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())