blob: 208ba9212e8240fba9e543facba399acec8c6404 [file] [log] [blame]
Stephen Hines0e2c34f2015-03-23 12:09:02 -07001// RUN: rm -rf %t
2
3// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fmodule-name=b -o %t/b.pcm -fmodule-maps \
4// RUN: -emit-module %S/Inputs/merge-decl-context/merge-decl-context.modulemap -I%S/Inputs \
5// RUN: -I %S/Inputs/merge-decl-context
6// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fmodule-name=c -o %t/c.pcm -fmodule-maps \
Pirama Arumuga Nainar3ea9e332015-04-08 08:57:32 -07007// 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
10// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fmodule-name=d -o %t/d.pcm -fmodule-maps \
11// RUN: -fmodule-file=%t/b.pcm -fno-implicit-modules \
Stephen Hines0e2c34f2015-03-23 12:09:02 -070012// 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.
16// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fmodule-file=%t/c.pcm -fmodule-file=%t/b.pcm \
Pirama Arumuga Nainar3ea9e332015-04-08 08:57:32 -070017// RUN: -fmodule-file=%t/d.pcm -fno-implicit-modules \
Stephen Hines0e2c34f2015-03-23 12:09:02 -070018// 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"
Pirama Arumuga Nainar3ea9e332015-04-08 08:57:32 -070024#include "Inputs/merge-decl-context/d.h"
Stephen Hines0e2c34f2015-03-23 12:09:02 -070025
26void t() {
27 ff(42);
28}