-------------------------------------------------------------------------
| 45 | |
| 46 | //------------------------------------------------------------------------- |
| 47 | bool ReleaseCoverageFilter::IsLineSelected( |
| 48 | const ModuleInfo& moduleInfo, |
| 49 | const FileInfo& fileInfo, |
| 50 | const LineInfo& lineInfo) |
| 51 | { |
| 52 | UpdateCachesIfExpired(moduleInfo, fileInfo); |
| 53 | |
| 54 | auto lineAddress = lineInfo.virtualAddress_; |
| 55 | if (mModuleData_->fileData_->lastSymbolAddresses_.count(lineAddress) == 0) |
| 56 | return true; |
| 57 | |
| 58 | auto& addressCountByLine = mModuleData_->fileData_->addressCountByLine_; |
| 59 | auto it = addressCountByLine.find(lineInfo.lineNumber_); |
| 60 | auto addressCount = (it == addressCountByLine.end()) ? 0 : it->second; |
| 61 | |
| 62 | if (addressCount < 2) |
| 63 | return true; |
| 64 | |
| 65 | if (mModuleData_->relocations_.count(lineAddress) == 0) |
| 66 | return true; |
| 67 | |
| 68 | LOG_DEBUG << "Optimized build support ignores line " |
| 69 | << lineInfo.lineNumber_ |
| 70 | << " of " << fileInfo.filePath_.wstring(); |
| 71 | return false; |
| 72 | } |
| 73 | |
| 74 | //------------------------------------------------------------------------- |
| 75 | void ReleaseCoverageFilter::UpdateCachesIfExpired( |
nothing calls this directly
no outgoing calls
no test coverage detected