| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef BASE_COMPILER_SPECIFIC_H_ | 5 #ifndef BASE_COMPILER_SPECIFIC_H_ |
| 6 #define BASE_COMPILER_SPECIFIC_H_ | 6 #define BASE_COMPILER_SPECIFIC_H_ |
| 7 | 7 |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 | 9 |
| 10 #if defined(COMPILER_MSVC) | 10 #if defined(COMPILER_MSVC) |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 // passing data to another process via shared memory. | 181 // passing data to another process via shared memory. |
| 182 #define MSAN_CHECK_MEM_IS_INITIALIZED(p, size) \ | 182 #define MSAN_CHECK_MEM_IS_INITIALIZED(p, size) \ |
| 183 __msan_check_mem_is_initialized(p, size) | 183 __msan_check_mem_is_initialized(p, size) |
| 184 #else // MEMORY_SANITIZER | 184 #else // MEMORY_SANITIZER |
| 185 #define MSAN_UNPOISON(p, size) | 185 #define MSAN_UNPOISON(p, size) |
| 186 #define MSAN_CHECK_MEM_IS_INITIALIZED(p, size) | 186 #define MSAN_CHECK_MEM_IS_INITIALIZED(p, size) |
| 187 #endif // MEMORY_SANITIZER | 187 #endif // MEMORY_SANITIZER |
| 188 | 188 |
| 189 // Macro useful for writing cross-platform function pointers. | 189 // Macro useful for writing cross-platform function pointers. |
| 190 #if !defined(CDECL) | 190 #if !defined(CDECL) |
| 191 #if defined(OS_WIN) | |
| 192 #define CDECL __cdecl | |
| 193 #else // defined(OS_WIN) | |
| 194 #define CDECL | 191 #define CDECL |
| 195 #endif // defined(OS_WIN) | |
| 196 #endif // !defined(CDECL) | 192 #endif // !defined(CDECL) |
| 197 | 193 |
| 198 // Macro for hinting that an expression is likely to be false. | 194 // Macro for hinting that an expression is likely to be false. |
| 199 #if !defined(UNLIKELY) | 195 #if !defined(UNLIKELY) |
| 200 #if defined(COMPILER_GCC) | 196 #if defined(COMPILER_GCC) |
| 201 #define UNLIKELY(x) __builtin_expect(!!(x), 0) | 197 #define UNLIKELY(x) __builtin_expect(!!(x), 0) |
| 202 #else | 198 #else |
| 203 #define UNLIKELY(x) (x) | 199 #define UNLIKELY(x) (x) |
| 204 #endif // defined(COMPILER_GCC) | 200 #endif // defined(COMPILER_GCC) |
| 205 #endif // !defined(UNLIKELY) | 201 #endif // !defined(UNLIKELY) |
| 206 | 202 |
| 207 #endif // BASE_COMPILER_SPECIFIC_H_ | 203 #endif // BASE_COMPILER_SPECIFIC_H_ |
| OLD | NEW |