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

Method getCacheFileId

src/Cache/PythonAPICache.cpp:69–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67PythonAPICache::PythonAPICache(PythonListen* listener) : m_listener(listener) {}
68
69PathId PythonAPICache::getCacheFileId(PathId sourceFileId) const {
70 ParseFile* parseFile = m_listener->getParseFile();
71 if (!sourceFileId) sourceFileId = parseFile->getFileId(LINE1);
72 if (!sourceFileId) return BadPathId;
73
74 FileSystem* const fileSystem = FileSystem::getInstance();
75 CommandLineParser* clp =
76 m_listener->getCompileSourceFile()->getCommandLineParser();
77 SymbolTable* symbolTable =
78 m_listener->getCompileSourceFile()->getSymbolTable();
79
80 const std::string_view libName =
81 m_listener->getCompileSourceFile()->getLibrary()->getName();
82 return fileSystem->getPythonCacheFile(clp->fileunit(), sourceFileId, libName,
83 symbolTable);
84}
85
86bool PythonAPICache::checkCacheIsValid(
87 PathId cacheFileId, const ::PythonAPICache::Reader& root) const {

Callers

nothing calls this directly

Calls 9

getParseFileMethod · 0.80
fileunitMethod · 0.80
getFileIdMethod · 0.45
getCommandLineParserMethod · 0.45
getCompileSourceFileMethod · 0.45
getSymbolTableMethod · 0.45
getNameMethod · 0.45
getLibraryMethod · 0.45
getPythonCacheFileMethod · 0.45

Tested by

no test coverage detected