|
1 | 1 | // RUN: rm -rf %t.pch %t.ll
|
2 | 2 | // RUN: %clang -x c-header %S/Inputs/ignored-pch.h -o %t.pch
|
3 | 3 | // RUN: %clang -S -emit-llvm %s -include-pch %t.pch -o %t.ll
|
4 |
| -// RUN: ls %t.pch | FileCheck --check-prefix=CHECK-PCH %s |
5 |
| -// RUN: ls %t.ll | FileCheck --check-prefix=CHECK-OBJ %s |
| 4 | +// RUN: ls %t.pch |
| 5 | +// RUN: ls %t.ll |
6 | 6 |
|
7 | 7 | // RUN: rm -rf %t.pch %t.ll
|
8 | 8 | // RUN: %clang -x c-header %S/Inputs/ignored-pch.h -o %t.pch
|
9 | 9 | // RUN: %clang %s -emit-ast -include-pch %t.pch -o %t.ll
|
10 |
| -// RUN: ls %t.pch | FileCheck --check-prefix=CHECK-PCH %s |
11 |
| -// RUN: ls %t.ll | FileCheck --check-prefix=CHECK-OBJ %s |
| 10 | +// RUN: ls %t.pch |
| 11 | +// RUN: ls %t.ll |
12 | 12 |
|
13 | 13 | // Check that -ignore-pch causes -emit-pch and -include-pch options to be ignored.
|
14 | 14 | // RUN: rm -rf %t.pch %t.ll
|
15 | 15 | // RUN: %clang -x c-header %S/Inputs/ignored-pch.h -ignore-pch -o %t.pch
|
16 | 16 | // RUN: %clang -S -emit-llvm %s -include-pch %t.pch -ignore-pch -o %t.ll
|
17 |
| -// RUN: not ls %t.pch 2>&1 | FileCheck --check-prefix=CHECK-PCH-ERROR %s |
18 |
| -// RUN: ls %t.ll 2>&1 | FileCheck --check-prefix=CHECK-OBJ %s |
| 17 | +// RUN: not ls %t.pch |
| 18 | +// RUN: ls %t.ll |
19 | 19 |
|
20 | 20 | // RUN: rm -rf %t.pch %t.ll
|
21 | 21 | // RUN: %clang -emit-ast %s -include-pch %t.pch -ignore-pch -o %t.ll
|
22 |
| -// RUN: not ls %t.ll 2>&1 | FileCheck --check-prefix=CHECK-OBJ-ERROR %s |
| 22 | +// RUN: not ls %t.ll |
23 | 23 |
|
24 | 24 | // Check that -ignore-pch works for multiple PCH related options.
|
25 | 25 | // Test with -building-pch-with-obj.
|
26 | 26 | // RUN: rm -rf %t.pch %t.ll
|
27 | 27 | // RUN: %clang -x c-header %S/Inputs/ignored-pch.h -ignore-pch -Xclang -building-pch-with-obj -o %t.pch
|
28 | 28 | // RUN: %clang -S -emit-llvm %s -include-pch %t.pch -ignore-pch -Xclang -building-pch-with-obj -o %t.ll
|
29 |
| -// RUN: not ls %t.pch 2>&1 | FileCheck --check-prefix=CHECK-PCH-ERROR %s |
30 |
| -// RUN: ls %t.ll | FileCheck --check-prefix=CHECK-OBJ %s |
| 29 | +// RUN: not ls %t.pch |
| 30 | +// RUN: ls %t.ll |
31 | 31 |
|
32 | 32 | // Test with -fallow-pch-with-compiler-errors.
|
33 | 33 | // RUN: rm -rf %t.pch %t.ll
|
34 | 34 | // RUN: %clang -x c-header %S/Inputs/ignored-pch.h -ignore-pch -Xclang -fallow-pch-with-compiler-errors -o %t.pch
|
35 | 35 | // RUN: %clang -S -emit-llvm %s -include-pch %t.pch -ignore-pch -Xclang -fallow-pch-with-compiler-errors -o %t.ll
|
36 |
| -// RUN: not ls %t.pch 2>&1 | FileCheck --check-prefix=CHECK-PCH-ERROR %s |
37 |
| -// RUN: ls %t.ll | FileCheck --check-prefix=CHECK-OBJ %s |
| 36 | +// RUN: not ls %t.pch |
| 37 | +// RUN: ls %t.ll |
38 | 38 |
|
39 | 39 | // Test with -fallow-pch-with-different-modules-cache-path.
|
40 | 40 | // RUN: rm -rf %t.pch %t.ll
|
41 | 41 | // RUN: %clang -x c-header %S/Inputs/ignored-pch.h -ignore-pch -Xclang -fallow-pch-with-different-modules-cache-path -o %t.pch
|
42 | 42 | // RUN: %clang -S -emit-llvm %s -ignore-pch -include-pch %t.pch -Xclang -fallow-pch-with-different-modules-cache-path -o %t.ll
|
43 |
| -// RUN: not ls %t.pch 2>&1 | FileCheck --check-prefix=CHECK-PCH-ERROR %s |
44 |
| -// RUN: ls %t.ll | FileCheck --check-prefix=CHECK-OBJ %s |
| 43 | +// RUN: not ls %t.pch |
| 44 | +// RUN: ls %t.ll |
45 | 45 |
|
46 | 46 | // Test with -fpch-codegen.
|
47 | 47 | // RUN: rm -rf %t.pch %t.ll
|
48 | 48 | // RUN: %clang -x c-header %S/Inputs/ignored-pch.h -ignore-pch -fpch-codegen -o %t.pch
|
49 | 49 | // RUN: %clang -S -emit-llvm %s -include-pch %t.pch -ignore-pch -fpch-codegen -o %t.ll
|
50 |
| -// RUN: not ls %t.pch 2>&1 | FileCheck --check-prefix=CHECK-PCH-ERROR %s |
51 |
| -// RUN: ls %t.ll | FileCheck --check-prefix=CHECK-OBJ %s |
| 50 | +// RUN: not ls %t.pch |
| 51 | +// RUN: ls %t.ll |
52 | 52 |
|
53 | 53 | // Test with -fpch-debuginfo.
|
54 | 54 | // RUN: rm -rf %t.pch %t.ll
|
55 | 55 | // RUN: %clang -x c-header %S/Inputs/ignored-pch.h -ignore-pch -fpch-debuginfo -o %t.pch
|
56 | 56 | // RUN: %clang -S -emit-llvm %s -include-pch %t.pch -ignore-pch -fpch-debuginfo -o %t.ll
|
57 |
| -// RUN: not ls %t.pch 2>&1 | FileCheck --check-prefix=CHECK-PCH %s |
58 |
| -// RUN: ls %t.ll | FileCheck --check-prefix=CHECK-OBJ %s |
| 57 | +// RUN: not ls %t.pch |
| 58 | +// RUN: ls %t.ll |
59 | 59 |
|
60 | 60 | // Test with -fpch-instantiate-templates.
|
61 | 61 | // RUN: rm -rf %t.pch %t.ll
|
62 | 62 | // RUN: %clang -x c-header %S/Inputs/ignored-pch.h -ignore-pch -fpch-instantiate-templates -o %t.pch
|
63 | 63 | // RUN: %clang -S -emit-llvm %s -include-pch %t.pch -ignore-pch -fpch-instantiate-templates -o %t.ll
|
64 |
| -// RUN: not ls %t.pch 2>&1 | FileCheck --check-prefix=CHECK-PCH %s |
65 |
| -// RUN: ls %t.ll | FileCheck --check-prefix=CHECK-OBJ %s |
| 64 | +// RUN: not ls %t.pch |
| 65 | +// RUN: ls %t.ll |
66 | 66 |
|
67 | 67 | // Test with -fno-pch-timestamp.
|
68 | 68 | // RUN: rm -rf %t.pch %t.ll
|
69 | 69 | // RUN: %clang -x c-header %S/Inputs/ignored-pch.h -ignore-pch -Xclang -fno-pch-timestamp -o %t.pch
|
70 | 70 | // RUN: %clang -S -emit-llvm %s -include-pch %t.pch -ignore-pch -Xclang -fno-pch-timestamp -o %t.ll
|
71 |
| -// RUN: not ls %t.pch 2>&1 | FileCheck --check-prefix=CHECK-PCH %s |
72 |
| -// RUN: ls %t.ll | FileCheck --check-prefix=CHECK-OBJ %s |
| 71 | +// RUN: not ls %t.pch |
| 72 | +// RUN: ls %t.ll |
73 | 73 |
|
74 | 74 | // Test with -fno-validate-pch.
|
75 | 75 | // RUN: rm -rf %t.pch %t.ll
|
76 | 76 | // RUN: %clang -x c-header %S/Inputs/ignored-pch.h -ignore-pch -Xclang -fno-validate-pch -o %t.pch
|
77 | 77 | // RUN: %clang -S -emit-llvm %s -include-pch %t.pch -ignore-pch -Xclang -fno-validate-pch -o %t.ll
|
78 |
| -// RUN: not ls %t.pch 2>&1 | FileCheck --check-prefix=CHECK-PCH %s |
79 |
| -// RUN: ls %t.ll | FileCheck --check-prefix=CHECK-OBJ %s |
| 78 | +// RUN: not ls %t.pch |
| 79 | +// RUN: ls %t.ll |
80 | 80 |
|
81 | 81 | // Test with -relocatable-pch.
|
82 | 82 | // RUN: rm -rf %t.pch %t.ll
|
83 | 83 | // RUN: %clang -x c-header %S/Inputs/ignored-pch.h -ignore-pch -relocatable-pch -o %t.pch
|
84 | 84 | // RUN: %clang -S -emit-llvm %s -include-pch %t.pch -ignore-pch -relocatable-pch -o %t.ll
|
85 |
| -// RUN: not ls %t.pch 2>&1 | FileCheck --check-prefix=CHECK-PCH %s |
86 |
| -// RUN: ls %t.ll | FileCheck --check-prefix=CHECK-OBJ %s |
| 85 | +// RUN: not ls %t.pch |
| 86 | +// RUN: ls %t.ll |
87 | 87 |
|
88 | 88 | // Test with -pch-through-hdrstop-create/-pch-through-hdrstop-use
|
89 | 89 | // RUN: rm -rf %t.pch %t.ll
|
90 | 90 | // RUN: %clang -x c-header %S/Inputs/ignored-pch.h -ignore-pch -Xclang -pch-through-hdrstop-create -o %t.pch
|
91 | 91 | // RUN: %clang -S -emit-llvm %s -include-pch %t.pch -ignore-pch -Xclang -pch-through-hdrstop-use -o %t.ll
|
92 |
| -// RUN: not ls %t.pch 2>&1 | FileCheck --check-prefix=CHECK-PCH %s |
93 |
| -// RUN: ls %t.ll | FileCheck --check-prefix=CHECK-OBJ %s |
| 92 | +// RUN: not ls %t.pch |
| 93 | +// RUN: ls %t.ll |
94 | 94 |
|
95 | 95 |
|
96 | 96 | // Test with AST dump output:
|
|
99 | 99 | // RUN: %clang %s -include-pch %t.pch -Xclang -ast-dump-all -c | FileCheck --check-prefix=CHECK-AST-PCH %s
|
100 | 100 | // RUN: %clang %s -include-pch %t.pch -ignore-pch -Xclang -ast-dump-all -c | FileCheck --check-prefix=CHECK-AST %s
|
101 | 101 |
|
102 |
| -// CHECK-PCH: ignored-pch.c.{{.*}}.pch |
103 |
| -// CHECK-OBJ: ignored-pch.c.{{.*}}.ll |
104 |
| -// CHECK-PCH-ERROR: ignored-pch.c.{{.*}}.pch{{'?}}: No such file or directory |
105 |
| -// CHECK-OBJ-ERROR: ignored-pch.c.{{.*}}.ll{{'?}}: No such file or directory |
106 | 102 | // CHECK-AST-PCH: <undeserialized declarations>
|
107 | 103 | // CHECK-AST-NOT: <undeserialized declarations>
|
108 | 104 |
|
|
0 commit comments