1 RUN: llvm-opt-report -r %p %p/Inputs/q2.yaml | FileCheck -strict-whitespace %s
2 RUN: llvm-opt-report -s -r %p %p/Inputs/q2.yaml | FileCheck -strict-whitespace -check-prefix=CHECK-SUCCINCT %s
4 ; CHECK: < {{.*[/\]}}q2.c
5 ; CHECK-NEXT: 1 | void bar();
6 ; CHECK-NEXT: 2 | void foo(int n) {
8 ; CHECK-NEXT: > quack, quack2:
9 ; CHECK-NEXT: 3 | for (int i = 0; i < n; ++i) for (int j = 0; j < n; ++j)
13 ; CHECK-NEXT: 3 | for (int i = 0; i < n; ++i) for (int j = 0; j < n; ++j)
14 ; CHECK-NEXT: {{\]\]}}
15 ; CHECK-NEXT: 4 | bar();
18 ; CHECK-NEXT: 7 | void quack() {
19 ; CHECK-NEXT: 8 I | foo(4);
22 ; CHECK-NEXT: 11 | void quack2() {
23 ; CHECK-NEXT: 12 I | foo(4);
27 ; CHECK-SUCCINCT: < {{.*[/\]}}q2.c
28 ; CHECK-SUCCINCT-NEXT: 1 | void bar();
29 ; CHECK-SUCCINCT-NEXT: 2 | void foo(int n) {
30 ; CHECK-SUCCINCT-NEXT: {{\[\[}}
31 ; CHECK-SUCCINCT-NEXT: > quack, quack2:
32 ; CHECK-SUCCINCT-NEXT: 3 | for (int i = 0; i < n; ++i) for (int j = 0; j < n; ++j)
33 ; CHECK-SUCCINCT-NEXT: U | ^
34 ; CHECK-SUCCINCT-NEXT: U | ^
35 ; CHECK-SUCCINCT-NEXT: > foo:
36 ; CHECK-SUCCINCT-NEXT: 3 | for (int i = 0; i < n; ++i) for (int j = 0; j < n; ++j)
37 ; CHECK-SUCCINCT-NEXT: {{\]\]}}
38 ; CHECK-SUCCINCT-NEXT: 4 | bar();
39 ; CHECK-SUCCINCT-NEXT: 5 | }
40 ; CHECK-SUCCINCT-NEXT: 6 |
41 ; CHECK-SUCCINCT-NEXT: 7 | void quack() {
42 ; CHECK-SUCCINCT-NEXT: 8 I | foo(4);
43 ; CHECK-SUCCINCT-NEXT: 9 | }
44 ; CHECK-SUCCINCT-NEXT: 10 |
45 ; CHECK-SUCCINCT-NEXT: 11 | void quack2() {
46 ; CHECK-SUCCINCT-NEXT: 12 I | foo(4);
47 ; CHECK-SUCCINCT-NEXT: 13 | }
48 ; CHECK-SUCCINCT-NEXT: 14 |