[cfe-commits] r97916 - /cfe/trunk/lib/Frontend/CacheTokens.cpp

Kovarththanan Rajaratnam kovarththanan.rajaratnam at gmail.com
Sun Mar 7 03:21:46 PST 2010


Author: krj
Date: Sun Mar  7 05:21:46 2010
New Revision: 97916

URL: http://llvm.org/viewvc/llvm-project?rev=97916&view=rev
Log:
Don't rely on implicit conversion

Modified:
    cfe/trunk/lib/Frontend/CacheTokens.cpp

Modified: cfe/trunk/lib/Frontend/CacheTokens.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CacheTokens.cpp?rev=97916&r1=97915&r2=97916&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CacheTokens.cpp (original)
+++ cfe/trunk/lib/Frontend/CacheTokens.cpp Sun Mar  7 05:21:46 2010
@@ -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())





More information about the cfe-commits mailing list