[all-commits] [llvm/llvm-project] d912f1: [Coverage] Let `Decision` take account of expansio...

NAKAMURA Takumi via All-commits all-commits at lists.llvm.org
Fri Feb 2 03:34:24 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d912f1f0cb49465b08f82fae89ece222404e5640
      https://github.com/llvm/llvm-project/commit/d912f1f0cb49465b08f82fae89ece222404e5640
  Author: NAKAMURA Takumi <geek4civic at gmail.com>
  Date:   2024-02-02 (Fri, 02 Feb 2024)

  Changed paths:
    M llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
    A llvm/test/tools/llvm-cov/Inputs/mcdc-macro.c
    A llvm/test/tools/llvm-cov/Inputs/mcdc-macro.o
    A llvm/test/tools/llvm-cov/Inputs/mcdc-macro.proftext
    A llvm/test/tools/llvm-cov/mcdc-macro.test

  Log Message:
  -----------
  [Coverage] Let `Decision` take account of expansions (#78969)

The current implementation (D138849) assumes `Branch`(es) would follow
after the corresponding `Decision`. It is not true if `Branch`(es) are
forwarded to expanded file ID. As a result, consecutive `Decision`(s)
would be confused with insufficient number of `Branch`(es).

`Expansion` will point `Branch`(es) in other file IDs if `Expansion` is
included in the range of `Decision`.

Fixes #77871

---------

Co-authored-by: Alan Phipps <a-phipps at ti.com>




More information about the All-commits mailing list