1 | // Used module not built with -decluse. |
2 | // RUN: rm -rf %t |
3 | // RUN: %clang_cc1 -x c++ -fmodules -fimplicit-module-maps -fmodule-name=XB -emit-module \ |
4 | // RUN: -I %S/Inputs/declare-use %S/Inputs/declare-use/module.map -o %t/b.pcm |
5 | // RUN: %clang_cc1 -x c++ -fmodules -fimplicit-module-maps -fmodules-cache-path=%t \ |
6 | // RUN: -fmodules-decluse \ |
7 | // RUN: -fmodule-file=%t/b.pcm -fmodule-name=XE -I %S/Inputs/declare-use %s |
8 | // |
9 | // Main module not built with -decluse. |
10 | // RUN: rm -rf %t |
11 | // RUN: %clang_cc1 -x c++ -fmodules -fimplicit-module-maps -fmodule-name=XB -emit-module \ |
12 | // RUN: -fmodules-decluse \ |
13 | // RUN: -I %S/Inputs/declare-use %S/Inputs/declare-use/module.map -o %t/b.pcm |
14 | // RUN: %clang_cc1 -x c++ -fmodules -fimplicit-module-maps -fmodules-cache-path=%t \ |
15 | // RUN: -fmodule-file=%t/b.pcm -fmodule-name=XE -I %S/Inputs/declare-use %s |
16 | // |
17 | // Used module not built with -decluse. |
18 | // RUN: rm -rf %t |
19 | // RUN: %clang_cc1 -x c++ -fmodules -fimplicit-module-maps -fmodule-name=XB -emit-module \ |
20 | // RUN: -I %S/Inputs/declare-use %S/Inputs/declare-use/module.map -o %t/b.pcm |
21 | // RUN: %clang_cc1 -x c++ -fmodules -fimplicit-module-maps -fmodules-cache-path=%t \ |
22 | // RUN: -fmodules-strict-decluse \ |
23 | // RUN: -fmodule-file=%t/b.pcm -fmodule-name=XE -I %S/Inputs/declare-use %s |
24 | // |
25 | // Main module not built with -decluse. |
26 | // RUN: rm -rf %t |
27 | // RUN: %clang_cc1 -x c++ -fmodules -fimplicit-module-maps -fmodule-name=XB -emit-module \ |
28 | // RUN: -fmodules-strict-decluse \ |
29 | // RUN: -I %S/Inputs/declare-use %S/Inputs/declare-use/module.map -o %t/b.pcm |
30 | // RUN: %clang_cc1 -x c++ -fmodules -fimplicit-module-maps -fmodules-cache-path=%t \ |
31 | // RUN: -fmodule-file=%t/b.pcm -fmodule-name=XE -I %S/Inputs/declare-use %s |
32 | |
33 | #include "b.h" |
34 | |
35 | const int g = b; |
36 | |
37 | |