[llvm-bugs] [Bug 38228] New: Some GCNO/GCDA in test/tools/llvm-cov/Inputs/ are not up to date
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Jul 19 10:07:23 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=38228
Bug ID: 38228
Summary: Some GCNO/GCDA in test/tools/llvm-cov/Inputs/ are not
up to date
Product: compiler-rt
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: profile
Assignee: unassignedbugs at nondot.org
Reporter: cdenizet at mozilla.com
CC: llvm-bugs at lists.llvm.org
For example with clang++-7 and llvm-cov-7 (debian) I get for
range_based_for.cpp:
File 'range_based_for.cpp'
Lines executed:100.00% of 3
range_based_for.cpp:creating 'range_based_for.cpp.gcov'
-: 0:Source:range_based_for.cpp
-: 0:Graph:range_based_for.gcno
-: 0:Data:range_based_for.gcda
-: 0:Runs:1
-: 0:Programs:1
-: 1:// Make sure that compiler-added local variables (whose line
number is zero)
-: 2:// don't crash llvm-cov.
-: 3:
-: 4:// We need shell for cd
-: 5:// REQUIRES: shell
-: 6:
-: 7:// RUN: rm -rf %t
-: 8:// RUN: mkdir %t
-: 9:// RUN: cd %t
-: 10:// RUN: cp %s %p/Inputs/range_based_for.gc* .
-: 11:
-: 12:// RUN: llvm-cov gcov range_based_for.cpp | FileCheck %s
--check-prefix=STDOUT
-: 13:// STDOUT: File 'range_based_for.cpp'
-: 14:// STDOUT: Lines executed:100.00% of 5
-: 15:// STDOUT: range_based_for.cpp:creating
'range_based_for.cpp.gcov'
-: 16:
-: 17:// RUN: FileCheck %s --check-prefix=GCOV <
%t/range_based_for.cpp.gcov
-: 18:// GCOV: -: 0:Runs:1
-: 19:// GCOV: -: 0:Programs:1
-: 20:
-: 21:int main(int argc, const char *argv[]) { // GCOV: 1:
[[@LINE]]:int main(
1: 22: int V[] = {1, 2}; // GCOV: 1:
[[@LINE]]: int V[]
8: 23: for (int &I : V) { // GCOV: 10:
[[@LINE]]: for (
-: 24: } // GCOV: 2:
[[@LINE]]: }
1: 25: return 0; // GCOV: 1:
[[@LINE]]: return
-: 26:} // GCOV: -:
[[@LINE]]:}
-: 27:
-: 28:// llvm-cov doesn't work on big endian yet
-: 29:// XFAIL: powerpc-, powerpc64-, s390x, mips-, mips64-, sparc
I think each test should compile itself to be sure to have correct gcno/gcda.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180719/f4f3e7f1/attachment-0001.html>
More information about the llvm-bugs
mailing list