Richard Smith | 8cebe37 | 2015-02-25 22:20:13 +0000 | [diff] [blame] | 1 | // RUN: rm -rf %t |
| 2 | |
Richard Smith | 47972af | 2015-06-16 00:08:24 +0000 | [diff] [blame^] | 3 | // RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fimplicit-module-maps -fmodule-name=b -o %t/b.pcm \ |
Richard Smith | 8cebe37 | 2015-02-25 22:20:13 +0000 | [diff] [blame] | 4 | // RUN: -emit-module %S/Inputs/merge-decl-context/merge-decl-context.modulemap -I%S/Inputs \ |
| 5 | // RUN: -I %S/Inputs/merge-decl-context |
Richard Smith | 47972af | 2015-06-16 00:08:24 +0000 | [diff] [blame^] | 6 | // RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fimplicit-module-maps -fmodule-name=c -o %t/c.pcm \ |
Richard Smith | 0b88437 | 2015-02-27 00:25:58 +0000 | [diff] [blame] | 7 | // RUN: -fmodule-file=%t/b.pcm -fno-implicit-modules \ |
| 8 | // RUN: -emit-module %S/Inputs/merge-decl-context/merge-decl-context.modulemap -I%S/Inputs \ |
| 9 | // RUN: -I %S/Inputs/merge-decl-context |
Richard Smith | 47972af | 2015-06-16 00:08:24 +0000 | [diff] [blame^] | 10 | // RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fimplicit-module-maps -fmodule-name=d -o %t/d.pcm \ |
Richard Smith | 0b88437 | 2015-02-27 00:25:58 +0000 | [diff] [blame] | 11 | // RUN: -fmodule-file=%t/b.pcm -fno-implicit-modules \ |
Richard Smith | 8cebe37 | 2015-02-25 22:20:13 +0000 | [diff] [blame] | 12 | // RUN: -emit-module %S/Inputs/merge-decl-context/merge-decl-context.modulemap -I%S/Inputs \ |
| 13 | // RUN: -I %S/Inputs/merge-decl-context |
| 14 | |
| 15 | // Use the two modules in a single compile. |
Richard Smith | 47972af | 2015-06-16 00:08:24 +0000 | [diff] [blame^] | 16 | // RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fimplicit-module-maps -fmodule-file=%t/c.pcm -fmodule-file=%t/b.pcm \ |
Richard Smith | 0b88437 | 2015-02-27 00:25:58 +0000 | [diff] [blame] | 17 | // RUN: -fmodule-file=%t/d.pcm -fno-implicit-modules \ |
Richard Smith | 8cebe37 | 2015-02-25 22:20:13 +0000 | [diff] [blame] | 18 | // RUN: -fmodule-map-file=%S/Inputs/merge-decl-context/merge-decl-context.modulemap -I%S/Inputs \ |
| 19 | // RUN: -emit-llvm -o %t/test.o %s |
| 20 | |
| 21 | #include "Inputs/merge-decl-context/a.h" |
| 22 | #include "Inputs/merge-decl-context/b.h" |
| 23 | #include "Inputs/merge-decl-context/c.h" |
Richard Smith | 0b88437 | 2015-02-27 00:25:58 +0000 | [diff] [blame] | 24 | #include "Inputs/merge-decl-context/d.h" |
Richard Smith | 8cebe37 | 2015-02-25 22:20:13 +0000 | [diff] [blame] | 25 | |
| 26 | void t() { |
| 27 | ff(42); |
| 28 | } |