diff options
Diffstat (limited to 'libcxx/utils/google-benchmark/src/internal_macros.h')
-rw-r--r-- | libcxx/utils/google-benchmark/src/internal_macros.h | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/libcxx/utils/google-benchmark/src/internal_macros.h b/libcxx/utils/google-benchmark/src/internal_macros.h index e8efcbb39c1..ab9dd85c102 100644 --- a/libcxx/utils/google-benchmark/src/internal_macros.h +++ b/libcxx/utils/google-benchmark/src/internal_macros.h @@ -30,13 +30,26 @@ #elif defined(_WIN32) #define BENCHMARK_OS_WINDOWS 1 #elif defined(__APPLE__) -// TODO(ericwf) This doesn't actually check that it is a Mac OSX system. Just -// that it is an apple system. -#define BENCHMARK_OS_MACOSX 1 +#include "TargetConditionals.h" + #if defined(TARGET_OS_MAC) + #define BENCHMARK_OS_MACOSX 1 + #if defined(TARGET_OS_IPHONE) + #define BENCHMARK_OS_IOS 1 + #endif + #endif #elif defined(__FreeBSD__) #define BENCHMARK_OS_FREEBSD 1 #elif defined(__linux__) #define BENCHMARK_OS_LINUX 1 +#elif defined(__native_client__) +#define BENCHMARK_OS_NACL 1 +#elif defined(EMSCRIPTEN) +#define BENCHMARK_OS_EMSCRIPTEN 1 +#endif + +#if !__has_feature(cxx_exceptions) && !defined(__cpp_exceptions) \ + && !defined(__EXCEPTIONS) +#define BENCHMARK_HAS_NO_EXCEPTIONS #endif #endif // BENCHMARK_INTERNAL_MACROS_H_ |