[all-commits] [llvm/llvm-project] e6a76a: [Clang][CoverageMapping] Fix compile time explosio...

Bruno Cardoso Lopes via All-commits all-commits at lists.llvm.org
Wed Jun 8 23:14:06 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e6a76a49356efd11f5f36690181f0f60cecb2e01
      https://github.com/llvm/llvm-project/commit/e6a76a49356efd11f5f36690181f0f60cecb2e01
  Author: Bruno Cardoso Lopes <bruno.cardoso at gmail.com>
  Date:   2022-06-08 (Wed, 08 Jun 2022)

  Changed paths:
    M clang/lib/CodeGen/CoverageMappingGen.cpp
    M clang/lib/CodeGen/CoverageMappingGen.h

  Log Message:
  -----------
  [Clang][CoverageMapping] Fix compile time explosions by adjusting only appropriated skipped ranges

D83592 added comments to be part of skipped regions, and as part of that, it
also shrinks a skipped range if it spans a line that contains a non-comment
token. This is done by `adjustSkippedRange`.

The `adjustSkippedRange` currently runs on skipped regions that are not
comments, causing a 5min regression while building a big C++ files without any
comments.

Fix the compile time introduced in D83592 by tagging SkippedRange with kind
information and use that to decide what needs additional processing.

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




More information about the All-commits mailing list