aboutsummaryrefslogtreecommitdiff
path: root/test/Modules
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-11-16 00:09:06 +0000
committerDouglas Gregor <dgregor@apple.com>2011-11-16 00:09:06 +0000
commitdb1cde7dc7bb3aaf48118bd9605192ab94a93635 (patch)
tree3d3ba9f78d5221bc5e8da06a5799137192bf8c1d /test/Modules
parente614d6c6b12f20f0072c20eb312db2e80d1cb051 (diff)
Add support for building a module from a module map to the -cc1
interface. This is currently limited to modules with umbrella headers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144736 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Modules')
-rw-r--r--test/Modules/Inputs/module.map4
-rw-r--r--test/Modules/diamond.c11
-rw-r--r--test/Modules/normal-module-map.cpp4
3 files changed, 12 insertions, 7 deletions
diff --git a/test/Modules/Inputs/module.map b/test/Modules/Inputs/module.map
new file mode 100644
index 0000000000..6737ee31a7
--- /dev/null
+++ b/test/Modules/Inputs/module.map
@@ -0,0 +1,4 @@
+module diamond_top { umbrella "diamond_top.h" }
+module diamond_left { umbrella "diamond_left.h" }
+module diamond_right { umbrella "diamond_right.h" }
+module diamond_bottom { umbrella "diamond_bottom.h" }
diff --git a/test/Modules/diamond.c b/test/Modules/diamond.c
index 482836c449..195e1da456 100644
--- a/test/Modules/diamond.c
+++ b/test/Modules/diamond.c
@@ -20,8 +20,9 @@ void test_diamond(int i, float f, double d, char c) {
lr.left = 17;
}
-// RUN: %clang_cc1 -emit-module -o %T/diamond_top.pcm %S/Inputs/diamond_top.h
-// RUN: %clang_cc1 -fmodule-cache-path %T -fdisable-module-hash -emit-module -o %T/diamond_left.pcm %S/Inputs/diamond_left.h
-// RUN: %clang_cc1 -fmodule-cache-path %T -fdisable-module-hash -emit-module -o %T/diamond_right.pcm %S/Inputs/diamond_right.h
-// RUN: %clang_cc1 -fmodule-cache-path %T -fdisable-module-hash -emit-module -o %T/diamond_bottom.pcm %S/Inputs/diamond_bottom.h
-// RUN: %clang_cc1 -fmodule-cache-path %T -fdisable-module-hash %s -verify
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -emit-module-from-map -fmodule-cache-path %t -fmodule-name=diamond_top %S/Inputs/module.map
+// RUN: %clang_cc1 -emit-module-from-map -fmodule-cache-path %t -fmodule-name=diamond_left %S/Inputs/module.map
+// RUN: %clang_cc1 -emit-module-from-map -fmodule-cache-path %t -fmodule-name=diamond_right %S/Inputs/module.map
+// RUN: %clang_cc1 -emit-module-from-map -fmodule-cache-path %t -fmodule-name=diamond_bottom %S/Inputs/module.map
+// RUN: %clang_cc1 -fmodule-cache-path %t %s -verify
diff --git a/test/Modules/normal-module-map.cpp b/test/Modules/normal-module-map.cpp
index 4dfa9c9a6c..73cfe8b675 100644
--- a/test/Modules/normal-module-map.cpp
+++ b/test/Modules/normal-module-map.cpp
@@ -1,8 +1,6 @@
// RUN: rm -rf %t
// RUN: %clang_cc1 -x objective-c -fmodule-cache-path %t -fauto-module-import -I %S/Inputs/normal-module-map %s -verify
-// FIXME: The expected error here is temporary, since we don't yet have the
-// logic to build a module from a module map.
#include "Umbrella/Umbrella.h"
int getUmbrella() {
@@ -11,6 +9,8 @@ int getUmbrella() {
__import_module__ Umbrella2;
+// FIXME: The expected error here is temporary, since we don't yet have the
+// logic to build a module from a module map.
#include "a1.h" // expected-error{{module 'libA' not found}}
#include "b1.h"
#include "nested/nested2.h"