[all-commits] [llvm/llvm-project] 1f34e2: [gcov] Ignore blocks from another file
Fangrui Song via All-commits
all-commits at lists.llvm.org
Fri Aug 11 18:46:30 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 1f34e282e8066281eb1447e21e44a2a2e9983e79
https://github.com/llvm/llvm-project/commit/1f34e282e8066281eb1447e21e44a2a2e9983e79
Author: Fangrui Song <i at maskray.me>
Date: 2023-08-11 (Fri, 11 Aug 2023)
Changed paths:
A compiler-rt/test/profile/Posix/gcov-file-change.cpp
M llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
Log Message:
-----------
[gcov] Ignore blocks from another file
Constructs such as inline variables, #line, and #include can create
lexical blocks with a different filename.
GCOVProfiling and llvm-cov gcov currently don't handle such cases (see
GCOVLines::writeOut and GCOVFile::readGCNO) and would incorrectly
attribute the line number to the current file.
For now, ignore such blocks. Missing line execution counts is better
than wrong ones.
More information about the All-commits
mailing list