| 165 | } |
| 166 | |
| 167 | void SymbolGuardian::UpdateFunctionHashes(ccc::SymbolDatabase& database, MemoryInterface& reader) |
| 168 | { |
| 169 | for (ccc::Function& function : database.functions) |
| 170 | { |
| 171 | if (function.original_hash() == 0) |
| 172 | continue; |
| 173 | |
| 174 | std::optional<ccc::FunctionHash> hash = HashFunction(function, reader); |
| 175 | if (!hash.has_value()) |
| 176 | continue; |
| 177 | |
| 178 | function.set_current_hash(*hash); |
| 179 | } |
| 180 | |
| 181 | for (ccc::SourceFile& source_file : database.source_files) |
| 182 | source_file.check_functions_match(database); |
| 183 | } |
| 184 | |
| 185 | std::optional<ccc::FunctionHash> SymbolGuardian::HashFunction(const ccc::Function& function, MemoryInterface& reader) |
| 186 | { |
no test coverage detected