]> granicus.if.org Git - clang/commitdiff
Test module lookup within a subdirectory of a normal include directory.
authorDouglas Gregor <dgregor@apple.com>
Sun, 29 Jan 2012 16:43:46 +0000 (16:43 +0000)
committerDouglas Gregor <dgregor@apple.com>
Sun, 29 Jan 2012 16:43:46 +0000 (16:43 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149196 91177308-0d34-0410-b5e6-96231b3b80d8

test/Modules/Inputs/subdir/module.map [new file with mode: 0644]
test/Modules/Inputs/subdir/subdir.h [new file with mode: 0644]
test/Modules/on-demand-build.m

diff --git a/test/Modules/Inputs/subdir/module.map b/test/Modules/Inputs/subdir/module.map
new file mode 100644 (file)
index 0000000..4cd0215
--- /dev/null
@@ -0,0 +1,3 @@
+module subdir {
+  header "subdir.h"
+}
diff --git a/test/Modules/Inputs/subdir/subdir.h b/test/Modules/Inputs/subdir/subdir.h
new file mode 100644 (file)
index 0000000..0fb3d21
--- /dev/null
@@ -0,0 +1 @@
+const char *getSubdir();
index 7b4a2ea1df0febccc5f9c5acc43022e8f957c22a..a7521fe78fcea202fd96a46639fec78ab5802eb9 100644 (file)
@@ -1,7 +1,7 @@
 // RUN: rm -rf %t
-// RUN: %clang_cc1 -fmodules -fno-objc-infer-related-result-type -Werror -Wno-error=incomplete-umbrella -fmodule-cache-path %t -F %S/Inputs -verify %s
-// RUN: %clang_cc1 -fmodules -fno-objc-infer-related-result-type -Werror -Wno-error=incomplete-umbrella -x objective-c++ -fmodule-cache-path %t -F %S/Inputs -verify %s
-// RUN: %clang_cc1 -fmodules -fno-objc-infer-related-result-type -Werror -Wno-error=incomplete-umbrella -fmodule-cache-path %t -F %S/Inputs -verify %s
+// RUN: %clang_cc1 -fmodules -fno-objc-infer-related-result-type -Werror -Wno-error=incomplete-umbrella -fmodule-cache-path %t -F %S/Inputs -I %S/Inputs -verify %s
+// RUN: %clang_cc1 -fmodules -fno-objc-infer-related-result-type -Werror -Wno-error=incomplete-umbrella -x objective-c++ -fmodule-cache-path %t -F %S/Inputs -I %S/Inputs -verify %s
+// RUN: %clang_cc1 -fmodules -fno-objc-infer-related-result-type -Werror -Wno-error=incomplete-umbrella -fmodule-cache-path %t -F %S/Inputs -I %S/Inputs -verify %s
 #define FOO
 @import Module;
 @interface OtherClass
@@ -22,3 +22,6 @@ void test_getModuleVersion() {
 #  error MODULE_SUBFRAMEWORK_H should be hidden
 #endif
 
+@import subdir;
+
+const char *getSubdirTest() { return getSubdir(); }