1*baeff989SAdam Czachorowski // Check that modules included in the preamble remain visible to the rest of the
2*baeff989SAdam Czachorowski // file.
3*baeff989SAdam Czachorowski 
4*baeff989SAdam Czachorowski // RUN: rm -rf %t.mcp
5*baeff989SAdam Czachorowski // 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*baeff989SAdam Czachorowski // 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*baeff989SAdam Czachorowski 
8*baeff989SAdam Czachorowski #ifndef MAIN_FILE
9*baeff989SAdam Czachorowski #define MAIN_FILE
10*baeff989SAdam Czachorowski // Premable section.
11*baeff989SAdam Czachorowski #include "Inputs/modules/Foo.h"
12*baeff989SAdam Czachorowski #else
13*baeff989SAdam Czachorowski // Main section.
14*baeff989SAdam Czachorowski MyType foo;
15*baeff989SAdam Czachorowski #endif
16