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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 } // extern "C" | 204 } // extern "C" |
205 | 205 |
206 // Mark a memory region fully initialized. | 206 // Mark a memory region fully initialized. |
207 // Use this to annotate code that deliberately reads uninitialized data, for | 207 // Use this to annotate code that deliberately reads uninitialized data, for |
208 // example a GC scavenging root set pointers from the stack. | 208 // example a GC scavenging root set pointers from the stack. |
209 #define MSAN_UNPOISON(p, s) __msan_unpoison(p, s) | 209 #define MSAN_UNPOISON(p, s) __msan_unpoison(p, s) |
210 #else // MEMORY_SANITIZER | 210 #else // MEMORY_SANITIZER |
211 #define MSAN_UNPOISON(p, s) | 211 #define MSAN_UNPOISON(p, s) |
212 #endif // MEMORY_SANITIZER | 212 #endif // MEMORY_SANITIZER |
213 | 213 |
| 214 // Macro useful for writing cross-platform function pointers. |
| 215 #if !defined(CDECL) |
| 216 #if defined(OS_WIN) |
| 217 #define CDECL __cdecl |
| 218 #else // defined(OS_WIN) |
| 219 #define CDECL |
| 220 #endif // defined(OS_WIN) |
| 221 #endif // !defined(CDECL) |
| 222 |
214 #endif // BASE_COMPILER_SPECIFIC_H_ | 223 #endif // BASE_COMPILER_SPECIFIC_H_ |
OLD | NEW |