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