| 1 |
// RUN: rm -rf %t |
| 2 |
// RUN: mkdir %t |
| 3 |
// |
| 4 |
// RUN: %clang_cc1 -x objective-c-header -emit-pch %S/Inputs/pch-typedef.h -o %t/pch-typedef.h.gch \ |
| 5 |
// RUN: -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/one |
| 6 |
// |
| 7 |
// RUN: not %clang_cc1 -x objective-c -fsyntax-only %s -include-pch %t/pch-typedef.h.gch \ |
| 8 |
// RUN: -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/two 2>&1 \ |
| 9 |
// RUN: | FileCheck %s -check-prefixes=CHECK-ERROR |
| 10 |
// |
| 11 |
// RUN: %clang_cc1 -x objective-c -fsyntax-only %s -include-pch %t/pch-typedef.h.gch \ |
| 12 |
// RUN: -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/two 2>&1 -fallow-pch-with-different-modules-cache-path \ |
| 13 |
// RUN: | FileCheck %s -check-prefixes=CHECK-SUCCESS -allow-empty |
| 14 |
|
| 15 |
pch_int x = 0; |
| 16 |
|
| 17 |
// CHECK-ERROR: precompiled file '{{.*}}' was compiled with module cache path '{{.*}}', but the path is currently '{{.*}}' |
| 18 |
// CHECK-SUCCESS-NOT: precompiled file '{{.*}}' was compiled with module cache path '{{.*}}', but the path is currently '{{.*}}' |