Index: llvm/lib/ProfileData/GCOV.cpp =================================================================== --- llvm/lib/ProfileData/GCOV.cpp +++ llvm/lib/ProfileData/GCOV.cpp @@ -140,6 +140,13 @@ if (version >= GCOV::V900) fn->endColumn = buf.getWord(); } + + // unify filename, as the same path can have different form + SmallString<256> P; + P.assign(filename); + sys::path::remove_dots(P, true); + filename = P.str(); + auto r = filenameToIdx.try_emplace(filename, filenameToIdx.size()); if (r.second) filenames.emplace_back(filename);