llvm.org GIT mirror llvm / f361756
[Coverage] Use the wrapped segment when a line has entry segments We've worked around bugs in the frontend by ignoring the count from wrapped segments when a line has at least one region entry segment. Those frontend bugs are now fixed, so it's time to regenerate the checked-in covmapping files and remove the workaround. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317761 91177308-0d34-0410-b5e6-96231b3b80d8 Vedant Kumar 1 year, 11 months ago
21 changed file(s) with 75 addition(s) and 108 deletion(s). Raw diff Collapse all Expand all
697697 if (!Mapped)
698698 return;
699699
700 // Pick the max count from the non-gap, region entry segments. If there
701 // aren't any, use the wrapped count.
702 if (!MinRegionCount) {
700 // Pick the max count from the non-gap, region entry segments and the
701 // wrapped count.
702 if (WrappedSegment)
703703 ExecutionCount = WrappedSegment->Count;
704 if (!MinRegionCount)
704705 return;
705 }
706706 for (const auto *LS : LineSegments)
707707 if (isStartOfRegion(LS))
708708 ExecutionCount = std::max(ExecutionCount, LS->Count);
1111
1212 // Verify the Summary Section for the first file
1313 // CHECK-SAME: "summary":{
14 // CHECK-SAME: "lines":{"count":40,"covered":27,"percent":67},
14 // CHECK-SAME: "lines":{"count":40,"covered":33,"percent":82},
1515 // CHECK-SAME: "functions":{"count":4,"covered":4,"percent":100},
16 // CHECK-SAME: "regions":{"count":19,"covered":11,"notcovered":8,"percent":57}}}
16 // CHECK-SAME: "regions":{"count":21,"covered":13,"notcovered":8,"percent":61}}}
1717
1818 // Close Files Array
1919 // CHECK-SAME: ],
4444
4545 // Full Export Summary
4646 // CHECK-SAME: "totals":{
47 // CHECK-SAME: "lines":{"count":40,"covered":27,"percent":67},
47 // CHECK-SAME: "lines":{"count":40,"covered":33,"percent":82},
4848 // CHECK-SAME: "functions":{"count":4,"covered":4,"percent":100},
4949 // CHECK-SAME: "instantiations":{"count":4,"covered":4,"percent":100},
50 // CHECK-SAME: "regions":{"count":19,"covered":11,"notcovered":8,"percent":57}}
51
52 // Close the export object, data array, and root object
53 // CHECK-SAME: }]}
50 // CHECK-SAME: "regions":{"count":21,"covered":13,"notcovered":8,"percent":61}}}
1111 for (T I = 0; I < ti; I++) { // HEADER: [[@LINE]]| 22| for (T
1212 t += I; // HEADER: [[@LINE]]| 20| t += I;
1313 if (I > ti / 2) // HEADER: [[@LINE]]| 20| if (I > ti
14 t -= 1; // HEADER: [[@LINE]]| 8| t -= 1;
14 t -= 1; // HEADER: [[@LINE]]| 20| t -= 1;
1515 } // HEADER: [[@LINE]]| 20| }
1616 // HEADER: [[@LINE]]| 2|
1717 return t; // HEADER: [[@LINE]]| 2| return t;
2121 // compile a program with two calls to Foo::DoIt(10) for each desired
2222 // architecture. Collect a raw profile from any one of these binaries, index
2323 // it, and check it in along with the executables.
24
25 // Note:
26 // The line execution count on line 14 is incorrect because of a bug in the
27 // checked-in coverage mappings, which has subsequently been fixed in clang.
1111
1212 // Verify the Summary Section for the first file
1313 // CHECK-SAME: "summary":{
14 // CHECK-SAME: "lines":{"count":21,"covered":18,"percent":85},
14 // CHECK-SAME: "lines":{"count":21,"covered":19,"percent":90},
1515 // CHECK-SAME: "functions":{"count":1,"covered":1,"percent":100},
16 // CHECK-SAME: "regions":{"count":10,"covered":7,"notcovered":3,"percent":70}}
16 // CHECK-SAME: "regions":{"count":11,"covered":8,"notcovered":3,"percent":72}}
1717
1818 // Close Files Array
1919 // CHECK-SAME: ],
2828
2929 // Full Export Summary
3030 // CHECK-SAME: "totals":{
31 // CHECK-SAME: "lines":{"count":21,"covered":18,"percent":85},
31 // CHECK-SAME: "lines":{"count":21,"covered":19,"percent":90},
3232 // CHECK-SAME: "functions":{"count":1,"covered":1,"percent":100},
3333 // CHECK-SAME: "instantiations":{"count":1,"covered":1,"percent":100},
34 // CHECK-SAME: "regions":{"count":10,"covered":7,"notcovered":3,"percent":70}}
35
36 // Close the export object, data array, and root object
37 // CHECK-SAME: }]}
34 // CHECK-SAME: "regions":{"count":11,"covered":8,"notcovered":3,"percent":72}}
9292 // MARKER-NEXT: Marker at 19:27 = 1
9393 // MARKER-NEXT: Highlighted line 24, 7 -> 12
9494 // MARKER-NEXT: Highlighted line 36, 5 -> 11
95 // MARKER-NEXT: Highlighted line 46, 1 -> ?
96 // MARKER-NEXT: Highlighted line 47, 1 -> 7
9795 // MARKER-NEXT: Highlighted line 47, 7 -> 14
9896 // MARKER-NEXT: Highlighted line 47, 14 -> 21
9997 // MARKER-NEXT: Highlighted line 47, 21 -> 23
104102 // MARKER-NEXT: Highlighted line 63, 5 -> 13
105103 // MARKER-NEXT: Highlighted line 67, 1 -> ?
106104 // MARKER-NEXT: Highlighted line 68, 1 -> 8
107 // MARKER-NEXT: Highlighted line 68, 8 -> ?
108 // MARKER-NEXT: Highlighted line 69, 1 -> 2
109 // MARKER-NEXT: Highlighted line 77, 1 -> 2
44 RUN: llvm-cov show %S/Inputs/templateInstantiations.covmapping -instr-profile %t.profdata -format html -show-region-summary -show-instantiation-summary -o %t.html.dir -path-equivalence=/tmp,%S %S/showTemplateInstantiations.cpp
55 RUN: FileCheck -check-prefix=FILE %s -input-file %t.html.dir/coverage/tmp/showTemplateInstantiations.cpp.html
66
7 FILE: Unexecuted instantiation: _Z4funcIiEiT_
78 FILE: Unexecuted instantiation: _Z4funcIbEiT_
8 FILE: Unexecuted instantiation: _Z4funcIiEiT_
99 FILE-NOT: Unexecuted instantiation
1010
1111 RUN: FileCheck -check-prefix=INDEX %s -input-file %t.html.dir/index.html
2222 INDEX:
2323 INDEX: 41.67% (5/12)
2424 INDEX:
25 INDEX: 20.00% (1/5)
25 INDEX: 16.67% (1/6)
33
44 // RUN: llvm-cov report %S/Inputs/multiple-files.covmapping -object %S/Inputs/highlightedRanges.covmapping -instr-profile %t.profdata | FileCheck %s -check-prefixes=OBJ1,OBJ2
55
6 // OBJ2: showHighlightedRanges.cpp
76 // OBJ1: f2.c
87 // OBJ1: f4.c
98 // OBJ1: f3.c
109 // OBJ1: f1.c
10 // OBJ2: showHighlightedRanges.cpp
88 // llvm-cov convert-for-testing -o prefer_used_to_unused.covmapping tmp
99
1010 // RUN: llvm-profdata merge %S/Inputs/prefer_used_to_unused.proftext -o %t.profdata
11 // RUN: llvm-cov show %S/Inputs/prefer_used_to_unused.covmapping -instr-profile %t.profdata -path-equivalence=/tmp/uu/./,%S %s | FileCheck %s
11 // RUN: llvm-cov show %S/Inputs/prefer_used_to_unused.covmapping -instr-profile %t.profdata -path-equivalence=/tmp/,%S %s | FileCheck %s
1212
1313 // Coverage data for this function has a non-zero hash value if it is used in the translation unit.
1414 inline int sampleFunc(int A) { // CHECK: [[@LINE]]| 1|inline int sampleFunc(int A) {
1515 if (A > 0) // CHECK-NEXT: [[@LINE]]| 1| if (A > 0)
1616 return A; // CHECK-NEXT: [[@LINE]]| 1| return A;
1717 return 0; // CHECK-NEXT: [[@LINE]]| 0| return 0;
18 } // CHECK-NEXT: [[@LINE]]| 1|}
18 } // CHECK-NEXT: [[@LINE]]| 0|}
1919
2020 // The hash for this function is zero in both cases, either it is used in the translation unit or not.
2121 inline int simpleFunc(int A) { // CHECK: [[@LINE]]| 1|inline int simpleFunc(int A) {
None // RUN: llvm-cov report %S/Inputs/report.covmapping -instr-profile %S/Inputs/report.profdata -path-equivalence=,%S 2>&1 -show-region-summary -show-instantiation-summary | FileCheck %s
1 // RUN: llvm-cov report -show-functions %S/Inputs/report.covmapping -instr-profile %S/Inputs/report.profdata -path-equivalence=,%S %s 2>&1 | FileCheck -check-prefix=FILT %s
2 // RUN: llvm-cov report -show-functions %S/Inputs/report.covmapping -instr-profile %S/Inputs/report.profdata -path-equivalence=,%S %s does-not-exist.cpp 2>&1 | FileCheck -check-prefix=FILT %s
3 // RUN: not llvm-cov report -show-functions %S/Inputs/report.covmapping -instr-profile %S/Inputs/report.profdata -path-equivalence=,%S 2>&1 | FileCheck -check-prefix=NO_FILES %s
0 // RUN: llvm-cov report %S/Inputs/report.covmapping -instr-profile %S/Inputs/report.profdata -path-equivalence=/tmp,%S 2>&1 -show-region-summary -show-instantiation-summary | FileCheck %s
1 // RUN: llvm-cov report -show-functions %S/Inputs/report.covmapping -instr-profile %S/Inputs/report.profdata -path-equivalence=/tmp,%S %s 2>&1 | FileCheck -check-prefix=FILT %s
2 // RUN: llvm-cov report -show-functions %S/Inputs/report.covmapping -instr-profile %S/Inputs/report.profdata -path-equivalence=/tmp,%S %s does-not-exist.cpp 2>&1 | FileCheck -check-prefix=FILT %s
3 // RUN: not llvm-cov report -show-functions %S/Inputs/report.covmapping -instr-profile %S/Inputs/report.profdata -path-equivalence=/tmp,%S 2>&1 | FileCheck -check-prefix=NO_FILES %s
44
55 // NO_FILES: Source files must be specified when -show-functions=true is specified
66
77 // CHECK: Regions Missed Regions Cover Functions Missed Functions Executed Instantiations Missed Insts. Executed Lines Missed Lines Cover
88 // CHECK-NEXT: ---
9 // CHECK-NEXT: report.cpp 5 2 60.00% 4 1 75.00% 4 1 75.00% 13 4 69.23%
9 // CHECK-NEXT: report.cpp 6 2 66.67% 4 1 75.00% 4 1 75.00% 13 3 76.92%
1010 // CHECK-NEXT: ---
11 // CHECK-NEXT: TOTAL 5 2 60.00% 4 1 75.00% 4 1 75.00% 13 4 69.23%
11 // CHECK-NEXT: TOTAL 6 2 66.67% 4 1 75.00% 4 1 75.00% 13 3 76.92%
1212
13 // FILT: File 'report.cpp':
13 // FILT: File '{{.*}}report.cpp':
1414 // FILT-NEXT: Name Regions Miss Cover Lines Miss Cover
1515 // FILT-NEXT: ---
16 // FILT-NEXT: _Z3foob 2 1 50.00% 4 2 50.00%
16 // FILT-NEXT: _Z3foob 3 1 66.67% 4 1 75.00%
1717 // FILT-NEXT: _Z3barv 1 0 100.00% 2 0 100.00%
1818 // FILT-NEXT: _Z4funcv 1 1 0.00% 2 2 0.00%
1919 // FILT-NEXT: main 1 0 100.00% 5 0 100.00%
2020 // FILT-NEXT: ---
21 // FILT-NEXT: TOTAL 5 2 60.00% 13 4 69.23%
21 // FILT-NEXT: TOTAL 6 2 66.67% 13 3 76.92%
2222
2323 void foo(bool cond) {
2424 if (cond) {
3838 }
3939
4040 // Test that listing multiple functions in a function view works.
41 // RUN: llvm-cov show -o %t.dir %S/Inputs/report.covmapping -instr-profile=%S/Inputs/report.profdata -path-equivalence=,%S -name-regex=".*" %s
42 // RUN: FileCheck -check-prefix=FUNCTIONS -input-file %t.dir/coverage/report.cpp.txt %s
41 // RUN: llvm-cov show -o %t.dir %S/Inputs/report.covmapping -instr-profile=%S/Inputs/report.profdata -path-equivalence=/tmp,%S -name-regex=".*" %s
42 // RUN: FileCheck -check-prefix=FUNCTIONS -input-file %t.dir/coverage/tmp/report.cpp.txt %s
4343 // FUNCTIONS: _Z3foob
4444 // FUNCTIONS: _Z3barv
4545 // FUNCTIONS: _Z4func
None // RUN: llvm-cov show %S/Inputs/highlightedRanges.covmapping -instr-profile %S/Inputs/highlightedRanges.profdata -dump -path-equivalence=/Users/bogner/code/llvm/test/tools,%S/.. %s 2>&1 | FileCheck %s -check-prefixes=TEXT,SHARED
0 // RUN: llvm-cov show %S/Inputs/highlightedRanges.covmapping -instr-profile %S/Inputs/highlightedRanges.profdata -dump -path-equivalence=/tmp,%S %s 2>&1 | FileCheck %s -check-prefixes=TEXT,SHARED
11
22 void func() {
33 return;
4343 return 0;
4444 }
4545
46 // RUN: llvm-cov show %S/Inputs/highlightedRanges.covmapping -instr-profile %S/Inputs/highlightedRanges.profdata -format html -dump -path-equivalence=/Users/bogner/code/llvm/test/tools,%S/.. %s 2>&1 | FileCheck %s -check-prefixes=HTML,SHARED
46 // RUN: llvm-cov show %S/Inputs/highlightedRanges.covmapping -instr-profile %S/Inputs/highlightedRanges.profdata -format html -dump -path-equivalence=/tmp,%S %s 2>&1 | FileCheck %s -check-prefixes=HTML,SHARED
4747 // RUN: llvm-cov export %S/Inputs/highlightedRanges.covmapping -instr-profile %S/Inputs/highlightedRanges.profdata 2>&1 | FileCheck %S/Inputs/highlightedRanges.json
66 int func(T x) { // ALL-NEXT: [[@LINE]]| 2|int func(T x) {
77 if(x) // ALL-NEXT: [[@LINE]]| 2| if(x)
88 return 0; // ALL-NEXT: [[@LINE]]| 1| return 0;
9 else // ALL-NEXT: [[@LINE]]| 2| else
9 else // ALL-NEXT: [[@LINE]]| 1| else
1010 return 1; // ALL-NEXT: [[@LINE]]| 1| return 1;
1111 int j = 1; // ALL-NEXT: [[@LINE]]| 0| int j = 1;
12 } // ALL-NEXT: [[@LINE]]| 2|}
12 } // ALL-NEXT: [[@LINE]]| 0|}
13
14 // ALL: _Z4{{[a-z]+}}IiEiT_:
15 // FILTER-NOT: _Z4{{[a-z]+}}IiEiT_:
16 // ALL: [[@LINE-10]]| 1|int func(T x) {
17 // ALL-NEXT: [[@LINE-10]]| 1| if(x)
18 // ALL-NEXT: [[@LINE-10]]| 0| return 0;
19 // ALL-NEXT: [[@LINE-10]]| 1| else
20 // ALL-NEXT: [[@LINE-10]]| 1| return 1;
21 // ALL-NEXT: [[@LINE-10]]| 0| int j = 1;
22 // ALL-NEXT: [[@LINE-10]]| 0|}
1323
1424 // SHARED: {{^ *(\| )?}}_Z4funcIbEiT_:
15 // SHARED: [[@LINE-9]]| 1|int func(T x) {
16 // SHARED-NEXT: [[@LINE-9]]| 1| if(x)
17 // SHARED-NEXT: [[@LINE-9]]| 1| return 0;
18 // SHARED-NEXT: [[@LINE-9]]| 1| else
19 // SHARED-NEXT: [[@LINE-9]]| 0| return 1;
20 // SHARED-NEXT: [[@LINE-9]]| 0| int j = 1;
21 // SHARED-NEXT: [[@LINE-9]]| 1|}
22
23 // ALL: {{^ *}}| _Z4funcIiEiT_:
24 // FILTER-NOT: {{^ *(\| )?}} _Z4funcIiEiT_:
25 // ALL: [[@LINE-19]]| 1|int func(T x) {
26 // ALL-NEXT: [[@LINE-19]]| 1| if(x)
27 // ALL-NEXT: [[@LINE-19]]| 0| return 0;
28 // ALL-NEXT: [[@LINE-19]]| 1| else
29 // ALL-NEXT: [[@LINE-19]]| 1| return 1;
30 // ALL-NEXT: [[@LINE-19]]| 0| int j = 1;
31 // ALL-NEXT: [[@LINE-19]]| 1|}
25 // SHARED: [[@LINE-19]]| 1|int func(T x) {
26 // SHARED-NEXT: [[@LINE-19]]| 1| if(x)
27 // SHARED-NEXT: [[@LINE-19]]| 1| return 0;
28 // SHARED-NEXT: [[@LINE-19]]| 0| else
29 // SHARED-NEXT: [[@LINE-19]]| 0| return 1;
30 // SHARED-NEXT: [[@LINE-19]]| 0| int j = 1;
31 // SHARED-NEXT: [[@LINE-19]]| 0|}
3232
3333 int main() { // ALL: [[@LINE]]| 1|int main() {
3434 func(0); // ALL-NEXT: [[@LINE]]| 1| func(0);
4444 // RUN: FileCheck -check-prefixes=HTML-SHARED,HTML-ALL -input-file=%t.html.dir/coverage/tmp/showTemplateInstantiations.cpp.html %s
4545 // RUN: FileCheck -check-prefixes=HTML-SHARED,HTML-FILTER -input-file=%t.html.filtered.dir/coverage/tmp/showTemplateInstantiations.cpp.html %s
4646
47 // HTML-ALL:
[[@LINE-44]]
// before

                  
                
48 // HTML-FILTER-NOT:
[[@LINE-45]]
// before

                  
                
49 // HTML-ALL:
[[@LINE-44]]
template<typename T>

                  
                
50 // HTML-ALL:
[[@LINE-44]]
2
int func(T x) {

                  
                
51 // HTML-ALL:
[[@LINE-44]]
2
  if(x)

                  
                
52 // HTML-ALL:
[[@LINE-44]]
1
    ret

                  
                
53 // HTML-ALL:
[[@LINE-44]]
2
  else

                  
                
54 // HTML-ALL:
[[@LINE-44]]
1
    ret

                  
                
55 // HTML-ALL:
[[@LINE-44]]
0

                  
                
56 // HTML-ALL:
[[@LINE-44]]
2
}

                  
                
57
58 // HTML-SHARED:
_Z4funcIbEiT_
59 // HTML-SHARED:
[[@LINE-53]]
1
int func(T x) {

                  
                
60 // HTML-SHARED:
[[@LINE-53]]
1
  if(x)

                  
                
61 // HTML-SHARED:
[[@LINE-53]]
1
    ret

                  
                
62 // HTML-SHARED:
[[@LINE-53]]
1
  else

                  
                
63 // HTML-SHARED:
[[@LINE-53]]
0

                  
                
64 // HTML-SHARED:
[[@LINE-53]]
0

                  
                
65 // HTML-SHARED:
[[@LINE-53]]
1
}
                  
                
47 // HTML-ALL:
4
// before
                  
                
48 // HTML-FILTER-NOT:
4
// before

                  
                
49 // HTML-ALL:
6
template<typename T>

                  
                
6650
6751 // HTML-ALL:
_Z4funcIiEiT_
6852 // HTML-FILTER-NOT:
_Z4funcIiEiT_
69 // HTML-ALL:
[[@LINE-63]]
1
int func(T x) {

                  
                
70 // HTML-ALL:
[[@LINE-63]]
1
  if(x)

                  
                
71 // HTML-ALL:
[[@LINE-63]]
0

                  
                
72 // HTML-ALL:
[[@LINE-63]]
1
  else

                  
                
73 // HTML-ALL:
[[@LINE-63]]
1
    ret

                  
                
74 // HTML-ALL:
[[@LINE-63]]
0

                  
                
75 // HTML-ALL:
[[@LINE-63]]
1
}
                  
                
53 // HTML-ALL:
7
1
int func(T x) {
                  
                
7654
77 // HTML-ALL:
[[@LINE-44]]
1
int main() {

                  
                
78 // HTML-ALL:
[[@LINE-44]]
1
  func<int>(0);

                  
                
79 // HTML-ALL:
[[@LINE-44]]
1
  func<bool>(true);

                  
                
80 // HTML-ALL:
[[@LINE-44]]
1
  return 0;

                  
                
81 // HTML-ALL:
[[@LINE-44]]
1
}

                  
                
82
83 // HTML-ALL:
[[@LINE-45]]
// after

                  
                
84 // HTML-FILTER-NOT:
[[@LINE-46]]
// after
                  
                
55 // HTML-SHARED:
_Z4funcIbEiT_
56 // HTML-SHARED:
7
1
int func(T x) {

                  
                
8557
8658 // RUN: FileCheck -check-prefix=HTML-JUMP -input-file=%t.html.dir/coverage/tmp/showTemplateInstantiations.cpp.html %s
8759 // HTML-JUMP:
Source (jump to first uncovered line)
9264 // NO_INSTS-NOT: {{^ *}}| _Z4funcIiEiT_:
9365
9466 // RUN: llvm-cov report %S/Inputs/templateInstantiations.covmapping -dump -instr-profile %S/Inputs/templateInstantiations.profdata -path-equivalence=/tmp,%S %s | FileCheck -check-prefix=DUMP %s
95 // DUMP: InstantiationGroup: Definition at line 7, column 30 with size = 2
67 // DUMP: InstantiationGroup: Definition at line 7, column 15 with size = 2
9668 // DUMP: InstantiationGroup: main with size = 1
513513 return tag("span", Snippet, Color.getValue());
514514 };
515515
516 auto CheckIfUncovered = [](const CoverageSegment *S) {
517 return S && S->HasCount && S->Count == 0;
516 auto CheckIfUncovered = [&](const CoverageSegment *S) {
517 return S && (!S->IsGapRegion || (Color && *Color == "red")) &&
518 S->HasCount && S->Count == 0;
518519 };
519520
520521 if (CheckIfUncovered(LCS.getWrappedSegment())) {
525526
526527 for (unsigned I = 0, E = Segments.size(); I < E; ++I) {
527528 const auto *CurSeg = Segments[I];
528 if (CurSeg->Col == ExpansionCol)
529 if (CheckIfUncovered(CurSeg))
530 Color = "red";
531 else if (CurSeg->Col == ExpansionCol)
529532 Color = "cyan";
530 else if ((!CurSeg->IsGapRegion || (Color && *Color == "red")) &&
531 CheckIfUncovered(CurSeg))
532 Color = "red";
533533 else
534534 Color = None;
535535
105105 SmallVector, 2> HighlightedRanges;
106106
107107 // The first segment overlaps from a previous line, so we treat it specially.
108 if (WrappedSegment && WrappedSegment->HasCount && WrappedSegment->Count == 0)
108 if (WrappedSegment && !WrappedSegment->IsGapRegion &&
109 WrappedSegment->HasCount && WrappedSegment->Count == 0)
109110 Highlight = raw_ostream::RED;
110111
111112 // Output each segment of the line, possibly highlighted.
119120 if (getOptions().Debug && Highlight)
120121 HighlightedRanges.push_back(std::make_pair(Col, End));
121122 Col = End;
122 if (Col == ExpansionCol)
123 if ((!S->IsGapRegion || (Highlight && *Highlight == raw_ostream::RED)) &&
124 S->HasCount && S->Count == 0)
125 Highlight = raw_ostream::RED;
126 else if (Col == ExpansionCol)
123127 Highlight = raw_ostream::CYAN;
124 else if ((!S->IsGapRegion || Highlight == raw_ostream::RED) &&
125 S->HasCount && S->Count == 0)
126 Highlight = raw_ostream::RED;
127128 else
128129 Highlight = None;
129130 }
647647 CoverageData Data = LoadedCoverage->getCoverageForFile("file1");
648648
649649 unsigned Line = 0;
650 unsigned LineCounts[] = {20, 20, 20, 20, 10, 10, 10, 10, 10, 0, 0};
650 unsigned LineCounts[] = {20, 20, 20, 20, 30, 10, 10, 10, 10, 0, 0};
651651 for (const auto &LCS : getLineCoverageStats(Data)) {
652652 ASSERT_EQ(Line + 1, LCS.getLine());
653 errs() << "Line: " << Line + 1 << ", count = " << LCS.getExecutionCount() << "\n";
653654 ASSERT_EQ(LineCounts[Line], LCS.getExecutionCount());
654655 ++Line;
655656 }