MCPcopy Create free account
hub / github.com/chipsalliance/Surelog / checkCacheIsValid

Method checkCacheIsValid

src/Cache/ParseCache.cpp:109–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107}
108
109bool 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
128bool ParseCache::checkCacheIsValid(PathId cacheFileId) const {
129 if (!cacheFileId) return false;

Callers

nothing calls this directly

Calls 5

isFilePrecompiledMethod · 0.80
getPpFileIdMethod · 0.80
toPlatformAbsPathMethod · 0.80
getSymbolTableMethod · 0.45
getCompileSourceFileMethod · 0.45

Tested by

no test coverage detected