1 // Make sure that compiler-added functions (whose line number is zero) don't
4 // We need shell for cd
10 // RUN: cp %s %p/Inputs/copy_block_helper.gc* .
12 // RUN: llvm-cov gcov copy_block_helper.m | FileCheck %s --check-prefix=STDOUT
13 // STDOUT: File 'copy_block_helper.m'
14 // STDOUT: Lines executed:100.00% of 5
15 // STDOUT: copy_block_helper.m:creating 'copy_block_helper.m.gcov'
17 // RUN: FileCheck %s --check-prefix=GCOV < %t/copy_block_helper.m.gcov
19 // GCOV: -: 0:Programs:1
21 id test_helper(id (^foo)(void)) { return foo(); } // GCOV: 1: [[@LINE]]:id
22 void test(id x) { // GCOV: -: [[@LINE]]:void test
23 test_helper(^{ // GCOV: 2: [[@LINE]]: test_helper
24 return x; // GCOV: 1: [[@LINE]]: return
25 }); // GCOV: -: [[@LINE]]:
26 } // GCOV: 1: [[@LINE]]:}
28 // GCOV: 1: [[@LINE+1]]:int main
29 int main(int argc, const char *argv[]) { test(0); }
31 // llvm-cov doesn't work on big endian yet
32 // XFAIL: host-byteorder-big-endian