diff options
| author | Eric Fiselier <eric@efcs.ca> | 2016-11-05 00:30:27 +0000 |
|---|---|---|
| committer | Eric Fiselier <eric@efcs.ca> | 2016-11-05 00:30:27 +0000 |
| commit | fbc9ff244c0da5a8e4e566b70a8fec3a50d88532 (patch) | |
| tree | 4143967ceb2630a5493a109e7a41e237bb34e422 /libcxx/utils/google-benchmark/src/internal_macros.h | |
| parent | 3a6f331d2d044e15f2e3b54bd776ba882ad06e52 (diff) | |
| download | bcm5719-llvm-fbc9ff244c0da5a8e4e566b70a8fec3a50d88532.tar.gz bcm5719-llvm-fbc9ff244c0da5a8e4e566b70a8fec3a50d88532.zip | |
Upgrade in-tree google benchmark to v1.1
llvm-svn: 286029
Diffstat (limited to 'libcxx/utils/google-benchmark/src/internal_macros.h')
| -rw-r--r-- | libcxx/utils/google-benchmark/src/internal_macros.h | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/libcxx/utils/google-benchmark/src/internal_macros.h b/libcxx/utils/google-benchmark/src/internal_macros.h index 1080ac9435a..e8efcbb39c1 100644 --- a/libcxx/utils/google-benchmark/src/internal_macros.h +++ b/libcxx/utils/google-benchmark/src/internal_macros.h @@ -4,37 +4,39 @@ #include "benchmark/macros.h" #ifndef __has_feature -# define __has_feature(x) 0 +#define __has_feature(x) 0 +#endif + +#if defined(__clang__) +#define COMPILER_CLANG +#elif defined(_MSC_VER) +#define COMPILER_MSVC +#elif defined(__GNUC__) +#define COMPILER_GCC #endif #if __has_feature(cxx_attributes) -# define BENCHMARK_NORETURN [[noreturn]] +#define BENCHMARK_NORETURN [[noreturn]] #elif defined(__GNUC__) -# define BENCHMARK_NORETURN __attribute__((noreturn)) +#define BENCHMARK_NORETURN __attribute__((noreturn)) +#elif defined(COMPILER_MSVC) +#define BENCHMARK_NORETURN __declspec(noreturn) #else -# define BENCHMARK_NORETURN +#define BENCHMARK_NORETURN #endif #if defined(__CYGWIN__) -# define BENCHMARK_OS_CYGWIN 1 +#define BENCHMARK_OS_CYGWIN 1 #elif defined(_WIN32) -# define BENCHMARK_OS_WINDOWS 1 +#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 +#define BENCHMARK_OS_MACOSX 1 #elif defined(__FreeBSD__) -# define BENCHMARK_OS_FREEBSD 1 +#define BENCHMARK_OS_FREEBSD 1 #elif defined(__linux__) -# define BENCHMARK_OS_LINUX 1 -#endif - -#if defined(__clang__) -# define COMPILER_CLANG -#elif defined(_MSC_VER) -# define COMPILER_MSVC -#elif defined(__GNUC__) -# define COMPILER_GCC +#define BENCHMARK_OS_LINUX 1 #endif -#endif // BENCHMARK_INTERNAL_MACROS_H_ +#endif // BENCHMARK_INTERNAL_MACROS_H_ |

