OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 23 matching lines...) Expand all Loading... |
34 | 34 |
35 /* COMPILER_QUIRK() - whether the compiler being used to build the project requi
res a given quirk. */ | 35 /* COMPILER_QUIRK() - whether the compiler being used to build the project requi
res a given quirk. */ |
36 #define COMPILER_QUIRK(WTF_COMPILER_QUIRK) (defined WTF_COMPILER_QUIRK_##WTF_COM
PILER_QUIRK && WTF_COMPILER_QUIRK_##WTF_COMPILER_QUIRK) | 36 #define COMPILER_QUIRK(WTF_COMPILER_QUIRK) (defined WTF_COMPILER_QUIRK_##WTF_COM
PILER_QUIRK && WTF_COMPILER_QUIRK_##WTF_COMPILER_QUIRK) |
37 | 37 |
38 /* ==== COMPILER() - the compiler being used to build the project ==== */ | 38 /* ==== COMPILER() - the compiler being used to build the project ==== */ |
39 | 39 |
40 /* COMPILER(CLANG) - Clang */ | 40 /* COMPILER(CLANG) - Clang */ |
41 #if defined(__clang__) | 41 #if defined(__clang__) |
42 #define WTF_COMPILER_CLANG 1 | 42 #define WTF_COMPILER_CLANG 1 |
43 | 43 |
44 #define CLANG_PRAGMA(PRAGMA) _Pragma(PRAGMA) | |
45 | |
46 /* Specific compiler features */ | 44 /* Specific compiler features */ |
47 | 45 |
48 #define WTF_COMPILER_SUPPORTS_CXX_EXPLICIT_CONVERSIONS __has_feature(cxx_explici
t_conversions) | 46 #define WTF_COMPILER_SUPPORTS_CXX_EXPLICIT_CONVERSIONS __has_feature(cxx_explici
t_conversions) |
49 | 47 |
50 #endif | 48 #endif |
51 | 49 |
52 #ifndef CLANG_PRAGMA | |
53 #define CLANG_PRAGMA(PRAGMA) | |
54 #endif | |
55 | |
56 /* COMPILER(MSVC) - Microsoft Visual C++ */ | 50 /* COMPILER(MSVC) - Microsoft Visual C++ */ |
57 #if defined(_MSC_VER) | 51 #if defined(_MSC_VER) |
58 #define WTF_COMPILER_MSVC 1 | 52 #define WTF_COMPILER_MSVC 1 |
59 #endif | 53 #endif |
60 | 54 |
61 /* COMPILER(GCC) - GNU Compiler Collection */ | 55 /* COMPILER(GCC) - GNU Compiler Collection */ |
62 #if defined(__GNUC__) | 56 #if defined(__GNUC__) |
63 #define WTF_COMPILER_GCC 1 | 57 #define WTF_COMPILER_GCC 1 |
64 #define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL
__) | 58 #define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL
__) |
65 #define GCC_VERSION_AT_LEAST(major, minor, patch) (GCC_VERSION >= (major * 10000
+ minor * 100 + patch)) | 59 #define GCC_VERSION_AT_LEAST(major, minor, patch) (GCC_VERSION >= (major * 10000
+ minor * 100 + patch)) |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 #define WTF_COMPILER_SUPPORTS_PRETTY_FUNCTION 1 | 172 #define WTF_COMPILER_SUPPORTS_PRETTY_FUNCTION 1 |
179 #define WTF_PRETTY_FUNCTION __PRETTY_FUNCTION__ | 173 #define WTF_PRETTY_FUNCTION __PRETTY_FUNCTION__ |
180 #elif COMPILER(MSVC) | 174 #elif COMPILER(MSVC) |
181 #define WTF_COMPILER_SUPPORTS_PRETTY_FUNCTION 1 | 175 #define WTF_COMPILER_SUPPORTS_PRETTY_FUNCTION 1 |
182 #define WTF_PRETTY_FUNCTION __FUNCSIG__ | 176 #define WTF_PRETTY_FUNCTION __FUNCSIG__ |
183 #else | 177 #else |
184 #define WTF_PRETTY_FUNCTION __FUNCTION__ | 178 #define WTF_PRETTY_FUNCTION __FUNCTION__ |
185 #endif | 179 #endif |
186 | 180 |
187 #endif /* WTF_Compiler_h */ | 181 #endif /* WTF_Compiler_h */ |
OLD | NEW |