1 RUN: llvm-opt-report -r %p %p/Inputs/qx.yaml | FileCheck -strict-whitespace %s
2 RUN: llvm-opt-report -no-demangle -r %p %p/Inputs/qx.yaml | FileCheck -strict-whitespace -check-prefix=CHECK-NODEM %s
3 RUN: llvm-opt-report -s -r %p %p/Inputs/qx.yaml | FileCheck -strict-whitespace -check-prefix=CHECK-SUCCINCT %s
5 ; CHECK: < {{.*[/\]}}q.cpp
6 ; CHECK-NEXT: 1 | void bar();
7 ; CHECK-NEXT: 2 | void foo(int n) {
9 ; CHECK-NEXT: > foo(int):
10 ; CHECK-NEXT: 3 | for (int i = 0; i < n; ++i)
11 ; CHECK-NEXT: > quack(), quack2():
12 ; CHECK-NEXT: 3 U4 | for (int i = 0; i < n; ++i)
13 ; CHECK-NEXT: {{\]\]}}
14 ; CHECK-NEXT: 4 | bar();
17 ; CHECK-NEXT: 7 | void quack() {
18 ; CHECK-NEXT: 8 I | foo(4);
21 ; CHECK-NEXT: 11 | void quack2() {
22 ; CHECK-NEXT: 12 I | foo(4);
26 ; CHECK-NODEM: < {{.*[/\]}}q.cpp
27 ; CHECK-NODEM-NEXT: 1 | void bar();
28 ; CHECK-NODEM-NEXT: 2 | void foo(int n) {
29 ; CHECK-NODEM-NEXT: {{\[\[}}
30 ; CHECK-NODEM-NEXT: > _Z3fooi:
31 ; CHECK-NODEM-NEXT: 3 | for (int i = 0; i < n; ++i)
32 ; CHECK-NODEM-NEXT: > _Z5quackv, _Z6quack2v:
33 ; CHECK-NODEM-NEXT: 3 U4 | for (int i = 0; i < n; ++i)
34 ; CHECK-NODEM-NEXT: {{\]\]}}
35 ; CHECK-NODEM-NEXT: 4 | bar();
36 ; CHECK-NODEM-NEXT: 5 | }
37 ; CHECK-NODEM-NEXT: 6 |
38 ; CHECK-NODEM-NEXT: 7 | void quack() {
39 ; CHECK-NODEM-NEXT: 8 I | foo(4);
40 ; CHECK-NODEM-NEXT: 9 | }
41 ; CHECK-NODEM-NEXT: 10 |
42 ; CHECK-NODEM-NEXT: 11 | void quack2() {
43 ; CHECK-NODEM-NEXT: 12 I | foo(4);
44 ; CHECK-NODEM-NEXT: 13 | }
45 ; CHECK-NODEM-NEXT: 14 |
47 ; CHECK-SUCCINCT: < {{.*[/\]}}q.cpp
48 ; CHECK-SUCCINCT-NEXT: 1 | void bar();
49 ; CHECK-SUCCINCT-NEXT: 2 | void foo(int n) {
50 ; CHECK-SUCCINCT-NEXT: {{\[\[}}
51 ; CHECK-SUCCINCT-NEXT: > foo(int):
52 ; CHECK-SUCCINCT-NEXT: 3 | for (int i = 0; i < n; ++i)
53 ; CHECK-SUCCINCT-NEXT: > quack(), quack2():
54 ; CHECK-SUCCINCT-NEXT: 3 U | for (int i = 0; i < n; ++i)
55 ; CHECK-SUCCINCT-NEXT: {{\]\]}}
56 ; CHECK-SUCCINCT-NEXT: 4 | bar();
57 ; CHECK-SUCCINCT-NEXT: 5 | }
58 ; CHECK-SUCCINCT-NEXT: 6 |
59 ; CHECK-SUCCINCT-NEXT: 7 | void quack() {
60 ; CHECK-SUCCINCT-NEXT: 8 I | foo(4);
61 ; CHECK-SUCCINCT-NEXT: 9 | }
62 ; CHECK-SUCCINCT-NEXT: 10 |
63 ; CHECK-SUCCINCT-NEXT: 11 | void quack2() {
64 ; CHECK-SUCCINCT-NEXT: 12 I | foo(4);
65 ; CHECK-SUCCINCT-NEXT: 13 | }
66 ; CHECK-SUCCINCT-NEXT: 14 |