| 1 |
// RUN: rm -rf %t |
| 2 |
// RUN: mkdir -p %t |
| 3 |
|
| 4 |
// Create PCH without -ignore-pch. |
| 5 |
// RUN: %clang -x c++-header %S/Inputs/pchfile.h -### 2>&1 | FileCheck %s -check-prefix=CHECK-EMIT-PCH |
| 6 |
// RUN: %clang -x c++-header %S/Inputs/pchfile.h -o %t/pchfile.h.pch |
| 7 |
// RUN: %clang %s -include-pch %t/pchfile.h.pch -### 2>&1 | FileCheck %s -check-prefix=CHECK-INCLUDE-PCH |
| 8 |
// RUN: %clang %s -emit-ast -include-pch %t/pchfile.h.pch -### 2>&1 | FileCheck %s -check-prefixes=CHECK-EMIT-PCH,CHECK-INCLUDE-PCH |
| 9 |
|
| 10 |
|
| 11 |
// Create PCH with -ignore-pch. |
| 12 |
// RUN: %clang -x c++-header -ignore-pch %S/Inputs/pchfile.h -### 2>&1 | FileCheck %s -check-prefix=CHECK-IGNORE-PCH |
| 13 |
// RUN: %clang %s -ignore-pch -include-pch %t/pchfile.h.pch -### 2>&1 | FileCheck %s -check-prefix=CHECK-IGNORE-PCH |
| 14 |
// RUN: %clang %s -ignore-pch -emit-ast -include-pch %t/pchfile.h.pch -### 2>&1 | FileCheck %s -check-prefix=CHECK-IGNORE-PCH |
| 15 |
|
| 16 |
// CHECK-EMIT-PCH: -emit-pch |
| 17 |
// CHECK-INCLUDE-PCH: -include-pch |
| 18 |
// CHECK-IGNORE-PCH-NOT: -emit-pch |
| 19 |
// CHECK-IGNORE-PCH-NOT: -include-pch |