| 107 | } |
| 108 | |
| 109 | bool ParseCache::checkCacheIsValid(PathId cacheFileId, |
| 110 | const ::ParseCache::Reader& root) const { |
| 111 | const ::Header::Reader& sourceHeader = root.getHeader(); |
| 112 | |
| 113 | SymbolTable* const symbolTable = |
| 114 | m_parse->getCompileSourceFile()->getSymbolTable(); |
| 115 | Precompiled* const prec = Precompiled::getSingleton(); |
| 116 | |
| 117 | if (prec->isFilePrecompiled(m_parse->getPpFileId(), symbolTable)) { |
| 118 | // For precompiled, check only the signature & version (so using |
| 119 | // BadPathId instead of the actual arguments) |
| 120 | return checkIfCacheIsValid(sourceHeader, kSchemaVersion, BadPathId, |
| 121 | BadPathId); |
| 122 | } else { |
| 123 | return checkIfCacheIsValid(sourceHeader, kSchemaVersion, cacheFileId, |
| 124 | m_parse->getPpFileId()); |
| 125 | } |
| 126 | } |
| 127 | |
| 128 | bool ParseCache::checkCacheIsValid(PathId cacheFileId) const { |
| 129 | if (!cacheFileId) return false; |
nothing calls this directly
no test coverage detected