mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
llvm-cov: Added -f option for function summaries.
Similar to the file summaries, the function summaries output line, branching and call statistics. The file summaries have been moved outside the initial loop so that all of the function summaries can be outputted before file summaries. Also updated test cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197633 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
65
test/tools/llvm-cov/Inputs/test_-b_-f.output
Normal file
65
test/tools/llvm-cov/Inputs/test_-b_-f.output
Normal file
@@ -0,0 +1,65 @@
|
||||
Function '_ZN1A1BEv'
|
||||
Lines executed:100.00% of 1
|
||||
No branches
|
||||
No calls
|
||||
|
||||
Function '_Z7uselessv'
|
||||
Lines executed:0.00% of 1
|
||||
No branches
|
||||
No calls
|
||||
|
||||
Function '_Z12more_uselessv'
|
||||
Lines executed:0.00% of 1
|
||||
No branches
|
||||
No calls
|
||||
|
||||
Function '_Z3foov'
|
||||
Lines executed:100.00% of 2
|
||||
No branches
|
||||
No calls
|
||||
|
||||
Function '_Z3barv'
|
||||
Lines executed:0.00% of 2
|
||||
No branches
|
||||
No calls
|
||||
|
||||
Function '_Z6assignii'
|
||||
Lines executed:100.00% of 3
|
||||
No branches
|
||||
No calls
|
||||
|
||||
Function '_Z15initialize_gridv'
|
||||
Lines executed:100.00% of 4
|
||||
Branches executed:100.00% of 4
|
||||
Taken at least once:100.00% of 4
|
||||
No calls
|
||||
|
||||
Function 'main'
|
||||
Lines executed:91.67% of 24
|
||||
Branches executed:100.00% of 11
|
||||
Taken at least once:81.82% of 11
|
||||
No calls
|
||||
|
||||
Function '_ZN1AC1Ev'
|
||||
Lines executed:100.00% of 1
|
||||
No branches
|
||||
No calls
|
||||
|
||||
Function '_ZN1AC2Ev'
|
||||
No executable lines
|
||||
No branches
|
||||
No calls
|
||||
|
||||
File 'test.cpp'
|
||||
Lines executed:84.21% of 38
|
||||
Branches executed:100.00% of 15
|
||||
Taken at least once:86.67% of 15
|
||||
No calls
|
||||
test.cpp:creating 'test.cpp.gcov'
|
||||
|
||||
File './test.h'
|
||||
Lines executed:100.00% of 1
|
||||
No branches
|
||||
No calls
|
||||
./test.h:creating 'test.h.gcov'
|
||||
|
38
test/tools/llvm-cov/Inputs/test_-f.output
Normal file
38
test/tools/llvm-cov/Inputs/test_-f.output
Normal file
@@ -0,0 +1,38 @@
|
||||
Function '_ZN1A1BEv'
|
||||
Lines executed:100.00% of 1
|
||||
|
||||
Function '_Z7uselessv'
|
||||
Lines executed:0.00% of 1
|
||||
|
||||
Function '_Z12more_uselessv'
|
||||
Lines executed:0.00% of 1
|
||||
|
||||
Function '_Z3foov'
|
||||
Lines executed:100.00% of 2
|
||||
|
||||
Function '_Z3barv'
|
||||
Lines executed:0.00% of 2
|
||||
|
||||
Function '_Z6assignii'
|
||||
Lines executed:100.00% of 3
|
||||
|
||||
Function '_Z15initialize_gridv'
|
||||
Lines executed:100.00% of 4
|
||||
|
||||
Function 'main'
|
||||
Lines executed:91.67% of 24
|
||||
|
||||
Function '_ZN1AC1Ev'
|
||||
Lines executed:100.00% of 1
|
||||
|
||||
Function '_ZN1AC2Ev'
|
||||
Lines executed:100.00% of 1
|
||||
|
||||
File 'test.cpp'
|
||||
Lines executed:84.21% of 38
|
||||
test.cpp:creating 'test.cpp.gcov'
|
||||
|
||||
File './test.h'
|
||||
Lines executed:100.00% of 1
|
||||
./test.h:creating './test.h.gcov'
|
||||
|
@@ -6,6 +6,7 @@ RUN: cd %t
|
||||
RUN: cp %p/Inputs/test* .
|
||||
|
||||
RUN: llvm-cov -gcno=test.gcno -gcda=test.gcda | diff test_no_options.output -
|
||||
RUN: llvm-cov -gcno=test.gcno -gcda=test.gcda -f | diff test_-f.output -
|
||||
RUN: diff -aub test_no_options.cpp.gcov test.cpp.gcov
|
||||
RUN: diff -aub test_no_options.h.gcov test.h.gcov
|
||||
|
||||
@@ -14,6 +15,9 @@ RUN: diff -aub test_-a.cpp.gcov test.cpp.gcov
|
||||
RUN: diff -aub test_-a.h.gcov test.h.gcov
|
||||
|
||||
RUN: llvm-cov -gcno=test.gcno -gcda=test.gcda -a -b | diff test_-b.output -
|
||||
# This is expected to fail because gcov doesn't actually output real branch or
|
||||
# call statistics on a per function basis.
|
||||
RUN: llvm-cov -gcno=test.gcno -gcda=test.gcda -a -b -f | not diff test_-b_-f.output -
|
||||
RUN: diff -aub test_-a_-b.cpp.gcov test.cpp.gcov
|
||||
RUN: diff -aub test_-a_-b.h.gcov test.h.gcov
|
||||
|
||||
|
Reference in New Issue
Block a user