-------------------------------------------------------------------------
| 94 | |
| 95 | //------------------------------------------------------------------------- |
| 96 | std::unique_ptr<ReleaseCoverageFilter::FileData> |
| 97 | ReleaseCoverageFilter::UpdateLineDataCaches( |
| 98 | const std::filesystem::path& filePath, const std::vector<LineInfo>& lineDatas) |
| 99 | { |
| 100 | auto fileData = std::make_unique<FileData>(); |
| 101 | fileData->path_ = filePath; |
| 102 | |
| 103 | std::unordered_map<ULONG, DWORD64> addressesBySymboleIndex; |
| 104 | for (const auto& lineData: lineDatas) |
| 105 | { |
| 106 | auto lineAddress = lineData.virtualAddress_; |
| 107 | auto symbolIndex = lineData.symbolIndex_; |
| 108 | auto lineNumber = lineData.lineNumber_; |
| 109 | |
| 110 | auto it = addressesBySymboleIndex.emplace(symbolIndex, 0).first; |
| 111 | it->second = std::max(it->second, lineAddress); |
| 112 | ++fileData->addressCountByLine_[lineNumber]; |
| 113 | } |
| 114 | |
| 115 | for (const auto& pair: addressesBySymboleIndex) |
| 116 | fileData->lastSymbolAddresses_.insert(pair.second); |
| 117 | return fileData; |
| 118 | } |
| 119 | } |
nothing calls this directly
no outgoing calls
no test coverage detected