diff options
Diffstat (limited to 'test/Modules/Inputs/libc-libcxx/sysroot/usr')
14 files changed, 90 insertions, 0 deletions
diff --git a/test/Modules/Inputs/libc-libcxx/sysroot/usr/include/c++/v1/__config b/test/Modules/Inputs/libc-libcxx/sysroot/usr/include/c++/v1/__config new file mode 100644 index 000000000000..eacda4840060 --- /dev/null +++ b/test/Modules/Inputs/libc-libcxx/sysroot/usr/include/c++/v1/__config @@ -0,0 +1,6 @@ +#ifndef _LIBCPP_CONFIG +#define _LIBCPP_CONFIG + +#define __LIBCXX_CONFIG + +#endif diff --git a/test/Modules/Inputs/libc-libcxx/sysroot/usr/include/c++/v1/math.h b/test/Modules/Inputs/libc-libcxx/sysroot/usr/include/c++/v1/math.h new file mode 100644 index 000000000000..f761b910f3ef --- /dev/null +++ b/test/Modules/Inputs/libc-libcxx/sysroot/usr/include/c++/v1/math.h @@ -0,0 +1,7 @@ +#ifndef LIBCXX_MATH_H +#define LIBCXX_MATH_H + +#include_next <math.h> +template<typename T> T abs(T t) { return (t < 0) ? -t : t; } + +#endif diff --git a/test/Modules/Inputs/libc-libcxx/sysroot/usr/include/c++/v1/module.modulemap b/test/Modules/Inputs/libc-libcxx/sysroot/usr/include/c++/v1/module.modulemap new file mode 100644 index 000000000000..b06142a61a20 --- /dev/null +++ b/test/Modules/Inputs/libc-libcxx/sysroot/usr/include/c++/v1/module.modulemap @@ -0,0 +1,10 @@ +module "libc++" { + module math { header "math.h" export * } + module stdlib { header "stdlib.h" export * } + module stddef { header "stddef.h" export * } + module stdio { textual header "stdio.h" export * } + // FIXME: remove "textual" from stdint module below once the issue + // between umbrella headers and builtins is resolved. + module stdint { textual header "stdint.h" export * } + module __config { header "__config" export * } +} diff --git a/test/Modules/Inputs/libc-libcxx/sysroot/usr/include/c++/v1/stddef.h b/test/Modules/Inputs/libc-libcxx/sysroot/usr/include/c++/v1/stddef.h new file mode 100644 index 000000000000..bd42008e1695 --- /dev/null +++ b/test/Modules/Inputs/libc-libcxx/sysroot/usr/include/c++/v1/stddef.h @@ -0,0 +1,6 @@ +#ifndef LIBCXX_STDDEF_H +#define LIBCXX_STDDEF_H + +#include <__config> + +#endif diff --git a/test/Modules/Inputs/libc-libcxx/sysroot/usr/include/c++/v1/stdint.h b/test/Modules/Inputs/libc-libcxx/sysroot/usr/include/c++/v1/stdint.h new file mode 100644 index 000000000000..7a68441bc3d2 --- /dev/null +++ b/test/Modules/Inputs/libc-libcxx/sysroot/usr/include/c++/v1/stdint.h @@ -0,0 +1,6 @@ +#ifndef LIBCXX_STDINT_H +#define LIBCXX_STDINT_H + +#include_next "stdint.h" + +#endif diff --git a/test/Modules/Inputs/libc-libcxx/sysroot/usr/include/c++/v1/stdio.h b/test/Modules/Inputs/libc-libcxx/sysroot/usr/include/c++/v1/stdio.h new file mode 100644 index 000000000000..399fce17534d --- /dev/null +++ b/test/Modules/Inputs/libc-libcxx/sysroot/usr/include/c++/v1/stdio.h @@ -0,0 +1,6 @@ +#ifndef LIBCXX_STDIO_H +#define LIBCXX_STDIO_H + +#include <__config> + +#endif diff --git a/test/Modules/Inputs/libc-libcxx/sysroot/usr/include/c++/v1/stdlib.h b/test/Modules/Inputs/libc-libcxx/sysroot/usr/include/c++/v1/stdlib.h new file mode 100644 index 000000000000..5053e0581b0c --- /dev/null +++ b/test/Modules/Inputs/libc-libcxx/sysroot/usr/include/c++/v1/stdlib.h @@ -0,0 +1,6 @@ +#ifndef LIBCXX_STDLIB_H +#define LIBCXX_STDLIB_H + +#include_next "stdlib.h" + +#endif diff --git a/test/Modules/Inputs/libc-libcxx/sysroot/usr/include/math.h b/test/Modules/Inputs/libc-libcxx/sysroot/usr/include/math.h new file mode 100644 index 000000000000..380ab41ca0a2 --- /dev/null +++ b/test/Modules/Inputs/libc-libcxx/sysroot/usr/include/math.h @@ -0,0 +1 @@ +int abs(int); diff --git a/test/Modules/Inputs/libc-libcxx/sysroot/usr/include/module.modulemap b/test/Modules/Inputs/libc-libcxx/sysroot/usr/include/module.modulemap new file mode 100644 index 000000000000..7244cb0987e7 --- /dev/null +++ b/test/Modules/Inputs/libc-libcxx/sysroot/usr/include/module.modulemap @@ -0,0 +1,8 @@ +module libc [no_undeclared_includes] { + module math { header "math.h" export * } + module stdlib { header "stdlib.h" export * } + module stddef { header "stddef.h" export * } + module stdint { header "stdint.h" export * } + module stdio { header "stdio.h" export * } + module util { header "util.h" export * } +} diff --git a/test/Modules/Inputs/libc-libcxx/sysroot/usr/include/stddef.h b/test/Modules/Inputs/libc-libcxx/sysroot/usr/include/stddef.h new file mode 100644 index 000000000000..eca72412a651 --- /dev/null +++ b/test/Modules/Inputs/libc-libcxx/sysroot/usr/include/stddef.h @@ -0,0 +1 @@ +// stddef.h diff --git a/test/Modules/Inputs/libc-libcxx/sysroot/usr/include/stdint.h b/test/Modules/Inputs/libc-libcxx/sysroot/usr/include/stdint.h new file mode 100644 index 000000000000..8d6c6fe237da --- /dev/null +++ b/test/Modules/Inputs/libc-libcxx/sysroot/usr/include/stdint.h @@ -0,0 +1,22 @@ +typedef char int_least8_t; +typedef short int_least16_t; +typedef int int_least32_t; +typedef long long int int_least64_t; +typedef unsigned char uint_least8_t; +typedef unsigned short uint_least16_t; +typedef unsigned int uint_least32_t; +typedef unsigned long long uint_least64_t; + +typedef char int_fast8_t; +typedef short int_fast16_t; +typedef int int_fast32_t; +typedef long long int int_fast64_t; +typedef unsigned char uint_fast8_t; +typedef unsigned short uint_fast16_t; +typedef unsigned int uint_fast32_t; +typedef unsigned long long uint_fast64_t; + +typedef int * intptr_t; +typedef unsigned int * uintptr_t; +typedef int intmax_t; +typedef unsigned int uintmax_t; diff --git a/test/Modules/Inputs/libc-libcxx/sysroot/usr/include/stdio.h b/test/Modules/Inputs/libc-libcxx/sysroot/usr/include/stdio.h new file mode 100644 index 000000000000..0b7bdeba9e11 --- /dev/null +++ b/test/Modules/Inputs/libc-libcxx/sysroot/usr/include/stdio.h @@ -0,0 +1,4 @@ +#ifndef DARWIN_STDIO_H +#define DARWIN_STDIO_H + +#endif diff --git a/test/Modules/Inputs/libc-libcxx/sysroot/usr/include/stdlib.h b/test/Modules/Inputs/libc-libcxx/sysroot/usr/include/stdlib.h new file mode 100644 index 000000000000..a84546e5bc83 --- /dev/null +++ b/test/Modules/Inputs/libc-libcxx/sysroot/usr/include/stdlib.h @@ -0,0 +1 @@ +#include <math.h> diff --git a/test/Modules/Inputs/libc-libcxx/sysroot/usr/include/util.h b/test/Modules/Inputs/libc-libcxx/sysroot/usr/include/util.h new file mode 100644 index 000000000000..22e95fcf9b6e --- /dev/null +++ b/test/Modules/Inputs/libc-libcxx/sysroot/usr/include/util.h @@ -0,0 +1,6 @@ +#ifndef DARWIN_UTIL_H +#define DARWIN_UTIL_H + +#include <stdio.h> + +#endif |