Skip to content

Commit 0650e9b

Browse files
committedDec 4, 2015
sancov -not-covered-functions.
Summary: The command prints out list of functions that were not entered. To do this, addresses are first converted to function locations. Set operations are used for function locations. Differential Revision: http://reviews.llvm.org/D14889 review llvm-svn: 254742
1 parent 1ce2b1a commit 0650e9b

File tree

4 files changed

+317
-94
lines changed

4 files changed

+317
-94
lines changed
 
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
REQUIRES: x86_64-linux
2-
RUN: sancov -obj %p/Inputs/test-linux_x86_64 -covered_functions %p/Inputs/test-linux_x86_64.sancov | FileCheck %s
3-
RUN: sancov -obj %p/Inputs/test-linux_x86_64 -covered_functions %p/Inputs/test-linux_x86_64-1.sancov | FileCheck --check-prefix=MULTIPLE_FILES %s
4-
RUN: sancov -obj %p/Inputs/test-linux_x86_64 -demangle=0 -covered_functions %p/Inputs/test-linux_x86_64.sancov | FileCheck --check-prefix=NO_DEMANGLE %s
2+
RUN: sancov -obj %p/Inputs/test-linux_x86_64 -covered-functions %p/Inputs/test-linux_x86_64.sancov | FileCheck %s
3+
RUN: sancov -obj %p/Inputs/test-linux_x86_64 -covered-functions -strip_path_prefix=Inputs/ %p/Inputs/test-linux_x86_64.sancov | FileCheck --check-prefix=STRIP_PATH %s
4+
RUN: sancov -obj %p/Inputs/test-linux_x86_64 -demangle=0 -covered-functions %p/Inputs/test-linux_x86_64.sancov | FileCheck --check-prefix=NO_DEMANGLE %s
55

66
CHECK: Inputs{{[/\\]}}test.cpp:12 bar(std::string)
77
CHECK: Inputs{{[/\\]}}test.cpp:14 main
88

9-
MULTIPLE_FILES: {{^}}foo.cpp:5 foo()
10-
MULTIPLE_FILES: {{^}}test.cpp:12 bar(std::string)
11-
MULTIPLE_FILES: {{^}}test.cpp:14 main
9+
STRIP_PATH: {{^}}test.cpp:12 bar(std::string)
10+
STRIP_PATH: {{^}}test.cpp:14 main
1211

1312
NO_DEMANGLE: test.cpp:12 _Z3barSs
1413
NO_DEMANGLE: test.cpp:14 main
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
REQUIRES: x86_64-linux
2+
RUN: sancov -obj %p/Inputs/test-linux_x86_64 -not-covered-functions %p/Inputs/test-linux_x86_64.sancov | FileCheck %s
3+
RUN: sancov -obj %p/Inputs/test-linux_x86_64 -not-covered-functions %p/Inputs/test-linux_x86_64-1.sancov | FileCheck --check-prefix=CHECK1 --allow-empty %s
4+
5+
CHECK: Inputs{{[/\\]}}foo.cpp:5 foo()
6+
CHECK1-NOT: {{.}}*
7+

‎llvm/tools/sancov/CMakeLists.txt

+4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
set(LLVM_LINK_COMPONENTS
2+
AllTargetsAsmPrinters
3+
AllTargetsDescs
4+
AllTargetsDisassemblers
5+
AllTargetsInfos
26
DebugInfoDWARF
37
DebugInfoPDB
48
Object

0 commit comments

Comments
 (0)