Introduce basic support for parsing module map files.
Module map files provide a way to map between headers and modules, so
that we can layer a module system on top of existing headers without
changing those headers at all.
This commit introduces the module map file parser and the module map
that it generates, and wires up the module map file parser so that
we'll automatically find module map files as part of header
search. Note that we don't yet use the information stored in the
module map.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144402 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Modules/Inputs/normal-module-map/a1.h b/test/Modules/Inputs/normal-module-map/a1.h
new file mode 100644
index 0000000..f2d5a49
--- /dev/null
+++ b/test/Modules/Inputs/normal-module-map/a1.h
@@ -0,0 +1 @@
+int a1;
diff --git a/test/Modules/Inputs/normal-module-map/a2.h b/test/Modules/Inputs/normal-module-map/a2.h
new file mode 100644
index 0000000..5c4e7ff
--- /dev/null
+++ b/test/Modules/Inputs/normal-module-map/a2.h
@@ -0,0 +1 @@
+int a2;
diff --git a/test/Modules/Inputs/normal-module-map/b1.h b/test/Modules/Inputs/normal-module-map/b1.h
new file mode 100644
index 0000000..2ed1112
--- /dev/null
+++ b/test/Modules/Inputs/normal-module-map/b1.h
@@ -0,0 +1,2 @@
+int b1;
+
diff --git a/test/Modules/Inputs/normal-module-map/module.map b/test/Modules/Inputs/normal-module-map/module.map
new file mode 100644
index 0000000..c372662
--- /dev/null
+++ b/test/Modules/Inputs/normal-module-map/module.map
@@ -0,0 +1,8 @@
+module libA {
+ header "a1.h"
+ header "a2.h"
+}
+
+module libB {
+ header "b1.h"
+}
diff --git a/test/Modules/Inputs/normal-module-map/nested/module.map b/test/Modules/Inputs/normal-module-map/nested/module.map
new file mode 100644
index 0000000..fd463c2
--- /dev/null
+++ b/test/Modules/Inputs/normal-module-map/nested/module.map
@@ -0,0 +1,4 @@
+module libNested {
+ header "nested1.h"
+ header "nested2.h"
+}
\ No newline at end of file
diff --git a/test/Modules/Inputs/normal-module-map/nested/nested1.h b/test/Modules/Inputs/normal-module-map/nested/nested1.h
new file mode 100644
index 0000000..3790d1a
--- /dev/null
+++ b/test/Modules/Inputs/normal-module-map/nested/nested1.h
@@ -0,0 +1 @@
+int nested1;
diff --git a/test/Modules/Inputs/normal-module-map/nested/nested2.h b/test/Modules/Inputs/normal-module-map/nested/nested2.h
new file mode 100644
index 0000000..d56d601
--- /dev/null
+++ b/test/Modules/Inputs/normal-module-map/nested/nested2.h
@@ -0,0 +1 @@
+int nested2;
diff --git a/test/Modules/normal-module-map.cpp b/test/Modules/normal-module-map.cpp
new file mode 100644
index 0000000..2935c8b
--- /dev/null
+++ b/test/Modules/normal-module-map.cpp
@@ -0,0 +1,10 @@
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -x objective-c -fmodule-cache-path %t -fauto-module-import -I %S/Inputs/normal-module-map -verify %s
+
+#include "a1.h"
+#include "b1.h"
+#include "nested/nested2.h"
+
+int test() {
+ return a1 + b1 + nested2;
+}