1 // RUN: mkdir -p %t.dir && cd %t.dir
3 /// gcov 3.4 redesigned the format and changed the extension from .da to .gcda
4 // RUN: %clang --coverage -Xclang -coverage-version='304*' %s -o %t -dumpdir ./
5 // RUN: rm -f gcov-basic.gcda && %run %t && %run %t a
6 // RUN: llvm-cov gcov -t gcov-basic.gcno | FileCheck %s
8 /// r173147: split checksum into cfg checksum and line checksum.
9 // RUN: %clang --coverage -Xclang -coverage-version='407*' %s -o %t -dumpdir ./
10 // RUN: rm -f gcov-basic.gcda && %run %t && %run %t a
11 // RUN: llvm-cov gcov -t gcov-basic.gcno | FileCheck %s
13 /// r189778: the exit block moved from the last to the second.
14 // RUN: %clang --coverage -Xclang -coverage-version='408*' %s -o %t -dumpdir ./
15 // RUN: rm -f gcov-basic.gcda && %run %t && %run %t a
16 // RUN: llvm-cov gcov -t gcov-basic.gcno
18 /// PR gcov-profile/48463
19 // RUN: %clang --coverage -Xclang -coverage-version='800*' %s -o %t -dumpdir ./
20 // RUN: rm -f gcov-basic.gcda && %run %t && %run %t a
21 // RUN: llvm-cov gcov -t gcov-basic.gcno
23 /// PR gcov-profile/84846, r269678
24 // RUN: %clang --coverage -Xclang -coverage-version='900*' %s -o %t -dumpdir ./
25 // RUN: rm -f gcov-basic.gcda && %run %t && %run %t a
26 // RUN: llvm-cov gcov -t gcov-basic.gcno
32 int main(int argc
, char *argv
[]) { // CHECK: 2: [[@LINE]]:int main
33 if (argc
> 1) // CHECK-NEXT: 2: [[@LINE]]:
34 puts("hello"); // CHECK-NEXT: 1: [[@LINE]]:
35 return 0; // CHECK-NEXT: 2: [[@LINE]]: