1// RUN: rm -rf %t.dst %t.cache 2// RUN: mkdir -p %t.dst/folder-with-modulemap %t.dst/pch-folder 3// RUN: echo '#import "folder-with-modulemap/included.h"' > %t.dst/header.h 4// RUN: echo 'extern int MyModuleVersion;' > %t.dst/folder-with-modulemap/MyModule.h 5// RUN: echo '@import MyModule;' > %t.dst/folder-with-modulemap/included.h 6// RUN: echo 'module MyModule { header "MyModule.h" }' > %t.dst/folder-with-modulemap/MyModule.modulemap 7 8// RUN: %clang_cc1 -emit-pch -o %t.dst/pch-folder/header.pch -fmodule-map-file=%t.dst/folder-with-modulemap/MyModule.modulemap -x objective-c-header -fmodules-cache-path=%t.cache -fmodules -fimplicit-module-maps %t.dst/header.h 9// RUN: %clang_cc1 -fsyntax-only -fmodule-map-file=%t.dst/folder-with-modulemap/MyModule.modulemap -fmodules-cache-path=%t.cache -fmodules -fimplicit-module-maps %s -include-pch %t.dst/pch-folder/header.pch -verify 10 11// expected-no-diagnostics 12 13void test() { 14 (void)MyModuleVersion; // should be found by implicit import 15} 16 17