brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 1435d01 Raw
18 lines · plain
1// RUN: rm -rf %t.dst %t.cache2// RUN: mkdir -p %t.dst/folder-with-modulemap %t.dst/pch-folder3// RUN: echo '#import "folder-with-modulemap/included.h"' > %t.dst/header.h4// RUN: echo 'extern int MyModuleVersion;' > %t.dst/folder-with-modulemap/MyModule.h5// RUN: echo '@import MyModule;' > %t.dst/folder-with-modulemap/included.h6// RUN: echo 'module MyModule { header "MyModule.h" }' > %t.dst/folder-with-modulemap/module.modulemap7 8// RUN: %clang -o %t.dst/pch-folder/header.pch -x objective-c-header -fmodules-cache-path=%t.cache -fmodules %t.dst/header.h9// RUN: not %clang -fsyntax-only -fmodules-cache-path=%t.cache -fmodules %s -include-pch %t.dst/pch-folder/header.pch 2>&1 | FileCheck %s10 11void test() {12  (void)MyModuleVersion; // should be found by implicit import13}14 15// CHECK: module 'MyModule' in precompiled file '{{.*MyModule.*pcm}}' (imported by precompiled file '[[PCH:.*header.pch]]') is not defined in any loaded module map file; maybe you need to load '[[PATH:.*folder-with-modulemap]]16// CHECK: consider adding '[[PATH]]' to the header search path17// CHECK: imported by '[[PCH]]'18