1 // Check that modules included in the preamble remain visible to the rest of the
2 // file.
3 
4 // RUN: rm -rf %t.mcp
5 // RUN: %clang_cc1 -emit-pch -o %t.pch %s -fmodules -fmodule-map-file=%S/Inputs/modules/module.modulemap -fmodules-local-submodule-visibility -fmodules-cache-path=%t.mcp
6 // RUN: %clang_cc1 -include-pch %t.pch %s -fmodules -fmodule-map-file=%S/Inputs/modules/module.modulemap -fmodules-local-submodule-visibility -fmodules-cache-path=%t.mcp
7 
8 #ifndef MAIN_FILE
9 #define MAIN_FILE
10 // Premable section.
11 #include "Inputs/modules/Foo.h"
12 #else
13 // Main section.
14 MyType foo;
15 #endif
16