Adapt to Loc::filename now being a function

This commit is contained in:
Martin Kinkelin 2023-08-26 15:53:01 +02:00
parent ae52da1bfa
commit 8fc096e4c6
6 changed files with 11 additions and 31 deletions

View file

@ -20,8 +20,8 @@ void emitCoverageLinecountInc(const Loc &loc) {
// Only emit coverage increment for locations in the source of the current
// module
// (for example, 'inlined' methods from other source files should be skipped).
if (!global.params.cov || !loc.linnum() || !loc.filename || !m->d_cover_data ||
strcmp(m->srcfile.toChars(), loc.filename) != 0) {
if (!global.params.cov || !loc.linnum() || !loc.filename() ||
!m->d_cover_data || strcmp(m->srcfile.toChars(), loc.filename()) != 0) {
return;
}