[all-commits] [llvm/llvm-project] d1b098: [CoverageMapping] Remove dots from paths inside th...

Petr Hosek via All-commits all-commits at lists.llvm.org
Mon Jun 27 23:10:06 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d1b098fc825176242afee12b8f9dc14adf5eec51
      https://github.com/llvm/llvm-project/commit/d1b098fc825176242afee12b8f9dc14adf5eec51
  Author: Petr Hosek <phosek at google.com>
  Date:   2022-06-27 (Mon, 27 Jun 2022)

  Changed paths:
    M llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp
    A llvm/test/tools/llvm-cov/Inputs/relative_dir/header.h
    A llvm/test/tools/llvm-cov/Inputs/relative_dir/main.c
    A llvm/test/tools/llvm-cov/Inputs/relative_dir/main.covmapping
    A llvm/test/tools/llvm-cov/Inputs/relative_dir/main.proftext
    M llvm/test/tools/llvm-cov/coverage-prefix-map.test
    A llvm/test/tools/llvm-cov/relative-dir.test
    M llvm/unittests/ProfileData/CoverageMappingTest.cpp

  Log Message:
  -----------
  [CoverageMapping] Remove dots from paths inside the profile

We already remove dots from collected paths and path mappings. This
makes it difficult to match paths inside the profile which contain
dots. For example, we would never match /path/to/../file.c because
the collected path is always be normalized to /path/file.c. This
change enables dot removal for paths inside the profile to address
the issue.

Differential Revision: https://reviews.llvm.org/D122750




More information about the All-commits mailing list