summaryrefslogtreecommitdiffstats
path: root/clang/test/Modules/Inputs/DependsOnModule.framework
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2013-10-28 22:18:19 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2013-10-28 22:18:19 +0000
commita3feee2ad64b6604bcb35c27a35307bf470accd1 (patch)
treeddad19dc3de6eb67785751a907c8cfc504a217f7 /clang/test/Modules/Inputs/DependsOnModule.framework
parentd1cac0af6bef8496955bf2222e285c0ee46ded74 (diff)
downloadbcm5719-llvm-a3feee2ad64b6604bcb35c27a35307bf470accd1.tar.gz
bcm5719-llvm-a3feee2ad64b6604bcb35c27a35307bf470accd1.zip
Allow a new syntax in a module requires-declaration:
requires ! feature The purpose of this is to allow (for instance) the module map for /usr/include to exclude <tgmath.h> and <complex.h> when building in C++ (these headers are instead provided by the C++ standard library in this case, and the glibc C <tgmath.h> header would otherwise try to include <complex.h>, resulting in a module cycle). llvm-svn: 193549
Diffstat (limited to 'clang/test/Modules/Inputs/DependsOnModule.framework')
-rw-r--r--clang/test/Modules/Inputs/DependsOnModule.framework/Headers/not_cxx.h1
-rw-r--r--clang/test/Modules/Inputs/DependsOnModule.framework/Headers/not_objc.h1
-rw-r--r--clang/test/Modules/Inputs/DependsOnModule.framework/module.map8
3 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/Modules/Inputs/DependsOnModule.framework/Headers/not_cxx.h b/clang/test/Modules/Inputs/DependsOnModule.framework/Headers/not_cxx.h
new file mode 100644
index 00000000000..c29a9219c64
--- /dev/null
+++ b/clang/test/Modules/Inputs/DependsOnModule.framework/Headers/not_cxx.h
@@ -0,0 +1 @@
+extern int template;
diff --git a/clang/test/Modules/Inputs/DependsOnModule.framework/Headers/not_objc.h b/clang/test/Modules/Inputs/DependsOnModule.framework/Headers/not_objc.h
new file mode 100644
index 00000000000..f63975a25d1
--- /dev/null
+++ b/clang/test/Modules/Inputs/DependsOnModule.framework/Headers/not_objc.h
@@ -0,0 +1 @@
+int NSObject;
diff --git a/clang/test/Modules/Inputs/DependsOnModule.framework/module.map b/clang/test/Modules/Inputs/DependsOnModule.framework/module.map
index 2a3dd8038bd..5a1cacaad2a 100644
--- a/clang/test/Modules/Inputs/DependsOnModule.framework/module.map
+++ b/clang/test/Modules/Inputs/DependsOnModule.framework/module.map
@@ -8,6 +8,14 @@ framework module DependsOnModule {
requires cplusplus
header "cxx_other.h"
}
+ explicit module NotCXX {
+ requires !cplusplus
+ header "not_cxx.h"
+ }
+ explicit module NotObjC {
+ requires !objc
+ header "not_objc.h"
+ }
explicit framework module SubFramework {
umbrella header "SubFramework.h"
OpenPOWER on IntegriCloud