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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
159 #define PRINTF_FORMAT(format_param, dots_param) | 159 #define PRINTF_FORMAT(format_param, dots_param) |
160 #endif | 160 #endif |
161 | 161 |
162 // WPRINTF_FORMAT is the same, but for wide format strings. | 162 // WPRINTF_FORMAT is the same, but for wide format strings. |
163 // This doesn't appear to yet be implemented in any compiler. | 163 // This doesn't appear to yet be implemented in any compiler. |
164 // See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38308 . | 164 // See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38308 . |
165 #define WPRINTF_FORMAT(format_param, dots_param) | 165 #define WPRINTF_FORMAT(format_param, dots_param) |
166 // If available, it would look like: | 166 // If available, it would look like: |
167 // __attribute__((format(wprintf, format_param, dots_param))) | 167 // __attribute__((format(wprintf, format_param, dots_param))) |
168 | 168 |
169 | |
170 // MemorySanitizer annotations. | |
171 #ifdef MEMORY_SANITIZER | |
172 extern "C" { | |
173 void __msan_unpoison(const void *p, unsigned long s); | |
Mark Mentovai
2013/03/20 13:34:58
No indentation within extern "C". We treat it the
eugenis
2013/03/20 13:40:29
Done.
| |
174 } | |
Mark Mentovai
2013/03/20 13:34:58
} // extern "C"
(again, like a namespace)
eugenis
2013/03/20 13:40:29
Done.
| |
175 | |
176 // Mark a memory region fully initialized. | |
177 // Use this to annotate the code that deliberately reads uninitialized data, | |
Mark Mentovai
2013/03/20 13:34:58
Remove the word “the.”
eugenis
2013/03/20 13:40:29
Done.
| |
178 // for example a GC scavenging root set pointers from stack. | |
Mark Mentovai
2013/03/20 13:34:58
And here, “stack” needs “the.”
eugenis
2013/03/20 13:40:29
Done.
| |
179 #define MSAN_UNPOISON(p, s) __msan_unpoison(p, s) | |
180 #else // MEMORY_SANITIZER | |
Mark Mentovai
2013/03/20 13:34:58
At least two spaces between the last non-whitespac
eugenis
2013/03/20 13:40:29
Done.
| |
181 #define MSAN_UNPOISON(p, s) | |
182 #endif // MEMORY_SANITIZER | |
183 | |
169 #endif // BASE_COMPILER_SPECIFIC_H_ | 184 #endif // BASE_COMPILER_SPECIFIC_H_ |
OLD | NEW |