Daniel Jasper | 22a3e79 | 2015-02-19 09:56:13 +0000 | [diff] [blame] | 1 | // Used module not built with -decluse. |
| 2 | // RUN: rm -rf %t |
Richard Smith | 47972af | 2015-06-16 00:08:24 +0000 | [diff] [blame] | 3 | // RUN: %clang_cc1 -x c++ -fmodules -fimplicit-module-maps -fmodule-name=XB -emit-module \ |
Daniel Jasper | 22a3e79 | 2015-02-19 09:56:13 +0000 | [diff] [blame] | 4 | // RUN: -I %S/Inputs/declare-use %S/Inputs/declare-use/module.map -o %t/b.pcm |
Richard Smith | 47972af | 2015-06-16 00:08:24 +0000 | [diff] [blame] | 5 | // RUN: %clang_cc1 -x c++ -fmodules -fimplicit-module-maps -fmodules-cache-path=%t \ |
Daniel Jasper | 22a3e79 | 2015-02-19 09:56:13 +0000 | [diff] [blame] | 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 |
Richard Smith | 47972af | 2015-06-16 00:08:24 +0000 | [diff] [blame] | 11 | // RUN: %clang_cc1 -x c++ -fmodules -fimplicit-module-maps -fmodule-name=XB -emit-module \ |
Daniel Jasper | 22a3e79 | 2015-02-19 09:56:13 +0000 | [diff] [blame] | 12 | // RUN: -fmodules-decluse \ |
| 13 | // RUN: -I %S/Inputs/declare-use %S/Inputs/declare-use/module.map -o %t/b.pcm |
Richard Smith | 47972af | 2015-06-16 00:08:24 +0000 | [diff] [blame] | 14 | // RUN: %clang_cc1 -x c++ -fmodules -fimplicit-module-maps -fmodules-cache-path=%t \ |
Daniel Jasper | 22a3e79 | 2015-02-19 09:56:13 +0000 | [diff] [blame] | 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 |
Richard Smith | 47972af | 2015-06-16 00:08:24 +0000 | [diff] [blame] | 19 | // RUN: %clang_cc1 -x c++ -fmodules -fimplicit-module-maps -fmodule-name=XB -emit-module \ |
Daniel Jasper | 22a3e79 | 2015-02-19 09:56:13 +0000 | [diff] [blame] | 20 | // RUN: -I %S/Inputs/declare-use %S/Inputs/declare-use/module.map -o %t/b.pcm |
Richard Smith | 47972af | 2015-06-16 00:08:24 +0000 | [diff] [blame] | 21 | // RUN: %clang_cc1 -x c++ -fmodules -fimplicit-module-maps -fmodules-cache-path=%t \ |
Daniel Jasper | 22a3e79 | 2015-02-19 09:56:13 +0000 | [diff] [blame] | 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 |
Richard Smith | 47972af | 2015-06-16 00:08:24 +0000 | [diff] [blame] | 27 | // RUN: %clang_cc1 -x c++ -fmodules -fimplicit-module-maps -fmodule-name=XB -emit-module \ |
Daniel Jasper | 22a3e79 | 2015-02-19 09:56:13 +0000 | [diff] [blame] | 28 | // RUN: -fmodules-strict-decluse \ |
| 29 | // RUN: -I %S/Inputs/declare-use %S/Inputs/declare-use/module.map -o %t/b.pcm |
Richard Smith | 47972af | 2015-06-16 00:08:24 +0000 | [diff] [blame] | 30 | // RUN: %clang_cc1 -x c++ -fmodules -fimplicit-module-maps -fmodules-cache-path=%t \ |
Daniel Jasper | 22a3e79 | 2015-02-19 09:56:13 +0000 | [diff] [blame] | 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 | |