diff options
author | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2016-10-21 01:41:56 +0000 |
---|---|---|
committer | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2016-10-21 01:41:56 +0000 |
commit | ed84df008f609f7245871a9b6d00b57cb19410aa (patch) | |
tree | f1023c080423e162cdcdc393264e04ad853ce7b0 /clang/test/Modules/Inputs/libc-libcxx/include/c++ | |
parent | d15477b09d3142b4301f6e7bc8835ec04d639f59 (diff) | |
download | bcm5719-llvm-ed84df008f609f7245871a9b6d00b57cb19410aa.tar.gz bcm5719-llvm-ed84df008f609f7245871a9b6d00b57cb19410aa.zip |
[Modules] Add 'no_undeclared_includes' module map attribute
The 'no_undeclared_includes' attribute should be used in a module to
tell that only non-modular headers and headers from used modules are
accepted.
The main motivation behind this is to prevent dep cycles between system
libraries (such as darwin) and libc++.
Patch by Richard Smith!
llvm-svn: 284797
Diffstat (limited to 'clang/test/Modules/Inputs/libc-libcxx/include/c++')
3 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/Modules/Inputs/libc-libcxx/include/c++/math.h b/clang/test/Modules/Inputs/libc-libcxx/include/c++/math.h new file mode 100644 index 00000000000..890db371de6 --- /dev/null +++ b/clang/test/Modules/Inputs/libc-libcxx/include/c++/math.h @@ -0,0 +1,2 @@ +#include_next <math.h> +template<typename T> T abs(T t) { return (t < 0) ? -t : t; } diff --git a/clang/test/Modules/Inputs/libc-libcxx/include/c++/module.modulemap b/clang/test/Modules/Inputs/libc-libcxx/include/c++/module.modulemap new file mode 100644 index 00000000000..fd15779e934 --- /dev/null +++ b/clang/test/Modules/Inputs/libc-libcxx/include/c++/module.modulemap @@ -0,0 +1,4 @@ +module "libc++" { + module math { header "math.h" export * } + module stdlib { header "stdlib.h" export * } +} diff --git a/clang/test/Modules/Inputs/libc-libcxx/include/c++/stdlib.h b/clang/test/Modules/Inputs/libc-libcxx/include/c++/stdlib.h new file mode 100644 index 00000000000..6e736cbbaa0 --- /dev/null +++ b/clang/test/Modules/Inputs/libc-libcxx/include/c++/stdlib.h @@ -0,0 +1 @@ +#include_next "stdlib.h" |