| 540 | } |
| 541 | |
| 542 | void PPCache::restoreIncludeFileInfos( |
| 543 | SymbolTable& targetSymbols, |
| 544 | const ::capnp::List<::IncludeFileInfo>::Reader& sourceIncludeFileInfos, |
| 545 | const SymbolTable& sourceSymbols) { |
| 546 | FileSystem* const fileSystem = FileSystem::getInstance(); |
| 547 | |
| 548 | for (const ::IncludeFileInfo::Reader& sourceIncludeFileInfo : |
| 549 | sourceIncludeFileInfos) { |
| 550 | SymbolId sectionSymbolId = targetSymbols.copyFrom( |
| 551 | SymbolId(sourceIncludeFileInfo.getSectionSymbolId(), "<unknown"), |
| 552 | &sourceSymbols); |
| 553 | PathId sectionFileId = fileSystem->toPathId( |
| 554 | fileSystem->remap(sourceSymbols.getSymbol(SymbolId( |
| 555 | sourceIncludeFileInfo.getSectionFileId(), UnknownRawPath))), |
| 556 | &targetSymbols); |
| 557 | // std::cout << "read sectionFile: " << sectionFileName << " s:" << |
| 558 | // incinfo->m_sectionStartLine() << " o:" << incinfo->m_originalLine() << |
| 559 | // " t:" << incinfo->m_type() << "\n"; |
| 560 | m_pp->addIncludeFileInfo( |
| 561 | static_cast<IncludeFileInfo::Context>( |
| 562 | sourceIncludeFileInfo.getContext()), |
| 563 | sourceIncludeFileInfo.getSectionStartLine(), sectionSymbolId, |
| 564 | sectionFileId, sourceIncludeFileInfo.getOriginalStartLine(), |
| 565 | sourceIncludeFileInfo.getOriginalStartColumn(), |
| 566 | sourceIncludeFileInfo.getOriginalEndLine(), |
| 567 | sourceIncludeFileInfo.getOriginalEndColumn(), |
| 568 | static_cast<IncludeFileInfo::Action>(sourceIncludeFileInfo.getAction()), |
| 569 | sourceIncludeFileInfo.getIndexClosing(), |
| 570 | sourceIncludeFileInfo.getIndexClosing()); |
| 571 | } |
| 572 | } |
| 573 | |
| 574 | bool PPCache::restore(PathId cacheFileId, bool errorsOnly, |
| 575 | int32_t recursionDepth) { |
nothing calls this directly
no test coverage detected