summaryrefslogtreecommitdiffstats
path: root/clang/test/Modules/Inputs/modular_maps
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2013-09-11 07:20:44 +0000
committerDaniel Jasper <djasper@google.com>2013-09-11 07:20:44 +0000
commit97292843d0aa02785043c0580f46c6d7890575dd (patch)
treeec47e1b5f101d979a844f0e347d68c160a94dcb7 /clang/test/Modules/Inputs/modular_maps
parentc0070a43202b451f78d099a3adc66e7edc45a53e (diff)
downloadbcm5719-llvm-97292843d0aa02785043c0580f46c6d7890575dd.tar.gz
bcm5719-llvm-97292843d0aa02785043c0580f46c6d7890575dd.zip
Support for modular module-map-files
This patch is the first step to make module-map-files modular (instead of requiring a single "module.map"-file per include directory). This step adds a new "extern module" declaration that enables module-map-files to reference one another along with a very basic implementation. The next steps are: * Combine this with the use-declaration (from http://llvm-reviews.chandlerc.com/D1546) in order to only load module map files required for a specific compilation. * Add an additional flag to start with a specific module-map-file (instead of requiring there to be at least one "module.map"). Review: http://llvm-reviews.chandlerc.com/D1637 llvm-svn: 190497
Diffstat (limited to 'clang/test/Modules/Inputs/modular_maps')
-rw-r--r--clang/test/Modules/Inputs/modular_maps/a.h4
-rw-r--r--clang/test/Modules/Inputs/modular_maps/b.h4
-rw-r--r--clang/test/Modules/Inputs/modular_maps/module.map6
-rw-r--r--clang/test/Modules/Inputs/modular_maps/moduleb.map3
4 files changed, 17 insertions, 0 deletions
diff --git a/clang/test/Modules/Inputs/modular_maps/a.h b/clang/test/Modules/Inputs/modular_maps/a.h
new file mode 100644
index 00000000000..a36dc1b59d6
--- /dev/null
+++ b/clang/test/Modules/Inputs/modular_maps/a.h
@@ -0,0 +1,4 @@
+#ifndef A_H
+#define A_H
+const int a = 2;
+#endif
diff --git a/clang/test/Modules/Inputs/modular_maps/b.h b/clang/test/Modules/Inputs/modular_maps/b.h
new file mode 100644
index 00000000000..55daf728680
--- /dev/null
+++ b/clang/test/Modules/Inputs/modular_maps/b.h
@@ -0,0 +1,4 @@
+#ifndef B_H
+#define B_H
+const int b = 3;
+#endif
diff --git a/clang/test/Modules/Inputs/modular_maps/module.map b/clang/test/Modules/Inputs/modular_maps/module.map
new file mode 100644
index 00000000000..7018c413042
--- /dev/null
+++ b/clang/test/Modules/Inputs/modular_maps/module.map
@@ -0,0 +1,6 @@
+module A {
+ header "a.h"
+}
+
+extern module B "moduleb.map"
+
diff --git a/clang/test/Modules/Inputs/modular_maps/moduleb.map b/clang/test/Modules/Inputs/modular_maps/moduleb.map
new file mode 100644
index 00000000000..6f36ccd3baa
--- /dev/null
+++ b/clang/test/Modules/Inputs/modular_maps/moduleb.map
@@ -0,0 +1,3 @@
+module B {
+ private header "b.h"
+}
OpenPOWER on IntegriCloud