summaryrefslogtreecommitdiffstats
path: root/clang/test/Modules/Inputs/explicit-build
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Modules/Inputs/explicit-build')
-rw-r--r--clang/test/Modules/Inputs/explicit-build/a.h5
-rw-r--r--clang/test/Modules/Inputs/explicit-build/b.h7
-rw-r--r--clang/test/Modules/Inputs/explicit-build/c.h7
-rw-r--r--clang/test/Modules/Inputs/explicit-build/module.modulemap3
4 files changed, 22 insertions, 0 deletions
diff --git a/clang/test/Modules/Inputs/explicit-build/a.h b/clang/test/Modules/Inputs/explicit-build/a.h
new file mode 100644
index 00000000000..5e3602f58ff
--- /dev/null
+++ b/clang/test/Modules/Inputs/explicit-build/a.h
@@ -0,0 +1,5 @@
+#if !__building_module(a)
+#error "should only get here when building module a"
+#endif
+
+const int a = 1;
diff --git a/clang/test/Modules/Inputs/explicit-build/b.h b/clang/test/Modules/Inputs/explicit-build/b.h
new file mode 100644
index 00000000000..449b3859ab4
--- /dev/null
+++ b/clang/test/Modules/Inputs/explicit-build/b.h
@@ -0,0 +1,7 @@
+#include "a.h"
+
+#if !__building_module(b)
+#error "should only get here when building module b"
+#endif
+
+const int b = 2;
diff --git a/clang/test/Modules/Inputs/explicit-build/c.h b/clang/test/Modules/Inputs/explicit-build/c.h
new file mode 100644
index 00000000000..2c66a23e892
--- /dev/null
+++ b/clang/test/Modules/Inputs/explicit-build/c.h
@@ -0,0 +1,7 @@
+#include "b.h"
+
+#if !__building_module(c)
+#error "should only get here when building module c"
+#endif
+
+const int c = 3;
diff --git a/clang/test/Modules/Inputs/explicit-build/module.modulemap b/clang/test/Modules/Inputs/explicit-build/module.modulemap
new file mode 100644
index 00000000000..bd6ea830c2d
--- /dev/null
+++ b/clang/test/Modules/Inputs/explicit-build/module.modulemap
@@ -0,0 +1,3 @@
+module a { header "a.h" }
+module b { header "b.h" export * }
+module c { header "c.h" export * }
OpenPOWER on IntegriCloud