| 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 24 matching lines...) Expand all Loading... |
| 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 #endif | 43 #endif |
| 44 | 44 |
| 45 /* COMPILER(MSVC) - Microsoft Visual C++ */ | 45 /* COMPILER(MSVC) - Microsoft Visual C++ (and Clang when compiling for Windows).
*/ |
| 46 #if defined(_MSC_VER) | 46 #if defined(_MSC_VER) |
| 47 #define WTF_COMPILER_MSVC 1 | 47 #define WTF_COMPILER_MSVC 1 |
| 48 #endif | 48 #endif |
| 49 | 49 |
| 50 /* COMPILER(GCC) - GNU Compiler Collection */ | 50 /* COMPILER(GCC) - GNU Compiler Collection (and Clang when compiling for platfor
ms other than Windows). */ |
| 51 #if defined(__GNUC__) | 51 #if defined(__GNUC__) |
| 52 #define WTF_COMPILER_GCC 1 | 52 #define WTF_COMPILER_GCC 1 |
| 53 #define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL
__) | 53 #define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL
__) |
| 54 #define GCC_VERSION_AT_LEAST(major, minor, patch) (GCC_VERSION >= (major * 10000
+ minor * 100 + patch)) | 54 #define GCC_VERSION_AT_LEAST(major, minor, patch) (GCC_VERSION >= (major * 10000
+ minor * 100 + patch)) |
| 55 #else | 55 #else |
| 56 /* Define this for !GCC compilers, just so we can write things like GCC_VERSION_
AT_LEAST(4, 1, 0). */ | 56 /* Define this for !GCC compilers, just so we can write things like GCC_VERSION_
AT_LEAST(4, 1, 0). */ |
| 57 #define GCC_VERSION_AT_LEAST(major, minor, patch) 0 | 57 #define GCC_VERSION_AT_LEAST(major, minor, patch) 0 |
| 58 #endif | 58 #endif |
| 59 | 59 |
| 60 /* ==== Compiler features ==== */ | 60 /* ==== Compiler features ==== */ |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 /* NO_SANITIZE_UNRELATED_CAST - Disable runtime checks related to casts between | 162 /* NO_SANITIZE_UNRELATED_CAST - Disable runtime checks related to casts between |
| 163 * unrelated objects (-fsanitize=cfi-unrelated-cast or -fsanitize=vptr). */ | 163 * unrelated objects (-fsanitize=cfi-unrelated-cast or -fsanitize=vptr). */ |
| 164 | 164 |
| 165 #if COMPILER(CLANG) | 165 #if COMPILER(CLANG) |
| 166 #define NO_SANITIZE_UNRELATED_CAST __attribute__((no_sanitize("cfi-unrelated-cas
t", "vptr"))) | 166 #define NO_SANITIZE_UNRELATED_CAST __attribute__((no_sanitize("cfi-unrelated-cas
t", "vptr"))) |
| 167 #else | 167 #else |
| 168 #define NO_SANITIZE_UNRELATED_CAST | 168 #define NO_SANITIZE_UNRELATED_CAST |
| 169 #endif | 169 #endif |
| 170 | 170 |
| 171 #endif /* WTF_Compiler_h */ | 171 #endif /* WTF_Compiler_h */ |
| OLD | NEW |