1// REQUIRES: shell
2// RUN: rm -rf %t
3// RUN: rm -rf %t-saved
4// RUN: mkdir %t-saved
5
6// Initial module build
7// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fdisable-module-hash \
8// RUN:     -isysroot %S/Inputs/System -triple x86_64-apple-darwin10 -fsyntax-only %s -verify
9// RUN: cp %t/cstd.pcm %t-saved/cstd.pcm
10
11// Even with -Werror don't rebuild a system module
12// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fdisable-module-hash \
13// RUN:     -isysroot %S/Inputs/System -triple x86_64-apple-darwin10 -fsyntax-only %s -verify -Werror
14// RUN: diff %t/cstd.pcm %t-saved/cstd.pcm
15
16// Unless -Wsystem-headers is on
17// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fdisable-module-hash \
18// RUN:     -isysroot %S/Inputs/System -triple x86_64-apple-darwin10 -fsyntax-only %s -verify \
19// RUN:     -Werror=unused -Wsystem-headers
20// RUN: not diff %t/cstd.pcm %t-saved/cstd.pcm
21
22// expected-no-diagnostics
23@import cstd;
24