| 67 | PythonAPICache::PythonAPICache(PythonListen* listener) : m_listener(listener) {} |
| 68 | |
| 69 | PathId 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 | |
| 86 | bool PythonAPICache::checkCacheIsValid( |
| 87 | PathId cacheFileId, const ::PythonAPICache::Reader& root) const { |
nothing calls this directly
no test coverage detected