19 lines · c
1// RUN: rm -rf %t2// RUN: mkdir %t3//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/one6//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-ERROR10//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-empty14 15pch_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 '{{.*}}'19