diff options
Diffstat (limited to 'test/Modules/Inputs/libc-libcxx/sysroot')
17 files changed, 123 insertions, 0 deletions
diff --git a/test/Modules/Inputs/libc-libcxx/sysroot/Frameworks/A.framework/Headers/A.h b/test/Modules/Inputs/libc-libcxx/sysroot/Frameworks/A.framework/Headers/A.h new file mode 100644 index 0000000000000..2ee00c1129a3a --- /dev/null +++ b/test/Modules/Inputs/libc-libcxx/sysroot/Frameworks/A.framework/Headers/A.h @@ -0,0 +1,15 @@ +#ifndef __my_a +#define __my_a + +#include <A/int.h> +#include <stdint.h> + +#ifdef __cplusplus +extern "C" +{ +#endif + +typedef int_fast32_t my_a; +} + +#endif diff --git a/test/Modules/Inputs/libc-libcxx/sysroot/Frameworks/A.framework/Headers/int.h b/test/Modules/Inputs/libc-libcxx/sysroot/Frameworks/A.framework/Headers/int.h new file mode 100644 index 0000000000000..340315ed9f56f --- /dev/null +++ b/test/Modules/Inputs/libc-libcxx/sysroot/Frameworks/A.framework/Headers/int.h @@ -0,0 +1,14 @@ +#ifndef __my_int +#define __my_int + +#include <stdint.h> + +#ifdef __cplusplus +extern "C" +{ +#endif + +typedef int_fast32_t myint; +} + +#endif diff --git a/test/Modules/Inputs/libc-libcxx/sysroot/Frameworks/A.framework/Modules/module.modulemap b/test/Modules/Inputs/libc-libcxx/sysroot/Frameworks/A.framework/Modules/module.modulemap new file mode 100644 index 0000000000000..1e91233a90cef --- /dev/null +++ b/test/Modules/Inputs/libc-libcxx/sysroot/Frameworks/A.framework/Modules/module.modulemap @@ -0,0 +1,4 @@ +framework module A [extern_c] { + umbrella header "A.h" + export * +} 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 0000000000000..eacda48400608 --- /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 0000000000000..f761b910f3ef1 --- /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 0000000000000..b06142a61a207 --- /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 0000000000000..bd42008e16951 --- /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 0000000000000..7a68441bc3d28 --- /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 0000000000000..399fce17534d6 --- /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 0000000000000..5053e0581b0cd --- /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 0000000000000..380ab41ca0a2e --- /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 0000000000000..7244cb0987e7d --- /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 0000000000000..eca72412a651c --- /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 0000000000000..8d6c6fe237daa --- /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 0000000000000..0b7bdeba9e115 --- /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 0000000000000..a84546e5bc836 --- /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 0000000000000..22e95fcf9b6e7 --- /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 |