Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project 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 V8_BASE_MACROS_H_ | 5 #ifndef V8_BASE_MACROS_H_ |
| 6 #define V8_BASE_MACROS_H_ | 6 #define V8_BASE_MACROS_H_ |
| 7 | 7 |
| 8 #include "../../include/v8stdint.h" | 8 #include "../../include/v8stdint.h" |
| 9 | 9 |
| 10 | 10 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 47 | 47 |
| 48 // Newly written code should use V8_INLINE and V8_NOINLINE directly. | 48 // Newly written code should use V8_INLINE and V8_NOINLINE directly. |
| 49 #define INLINE(declarator) V8_INLINE declarator | 49 #define INLINE(declarator) V8_INLINE declarator |
| 50 #define NO_INLINE(declarator) V8_NOINLINE declarator | 50 #define NO_INLINE(declarator) V8_NOINLINE declarator |
| 51 | 51 |
| 52 | 52 |
| 53 // Newly written code should use V8_WARN_UNUSED_RESULT. | 53 // Newly written code should use V8_WARN_UNUSED_RESULT. |
| 54 #define MUST_USE_RESULT V8_WARN_UNUSED_RESULT | 54 #define MUST_USE_RESULT V8_WARN_UNUSED_RESULT |
| 55 | 55 |
| 56 | 56 |
| 57 // Define DISABLE_ASAN macros. | 57 // Define ASAN_BUILD macros. |
| 58 #ifdef ASAN_BUILD | |
| 59 #error "ASAN_BUILD macros must not be defined." | |
| 60 #endif | |
| 61 | |
| 58 #if defined(__has_feature) | 62 #if defined(__has_feature) |
| 59 #if __has_feature(address_sanitizer) | 63 #if __has_feature(address_sanitizer) |
| 60 #define DISABLE_ASAN __attribute__((no_sanitize_address)) | 64 #define ASAN_BUILD 1 |
|
Jakob Kummerow
2014/05/12 16:57:01
We already define V8_USE_ADDRESS_SANITIZER in zone
Igor Sheludko
2014/05/12 17:09:52
Done.
| |
| 61 #endif | 65 #endif |
| 62 #endif | 66 #endif |
| 63 | 67 |
| 64 | 68 |
| 65 #ifndef DISABLE_ASAN | 69 // Define DISABLE_ASAN macros. |
| 70 #ifdef ASAN_BUILD | |
| 71 #define DISABLE_ASAN __attribute__((no_sanitize_address)) | |
| 72 #else | |
| 66 #define DISABLE_ASAN | 73 #define DISABLE_ASAN |
| 67 #endif | 74 #endif |
| 68 | 75 |
| 69 | 76 |
| 70 #if V8_CC_GNU | 77 #if V8_CC_GNU |
| 71 #define V8_IMMEDIATE_CRASH() __builtin_trap() | 78 #define V8_IMMEDIATE_CRASH() __builtin_trap() |
| 72 #else | 79 #else |
| 73 #define V8_IMMEDIATE_CRASH() ((void(*)())0)() | 80 #define V8_IMMEDIATE_CRASH() ((void(*)())0)() |
| 74 #endif | 81 #endif |
| 75 | 82 |
| 76 #endif // V8_BASE_MACROS_H_ | 83 #endif // V8_BASE_MACROS_H_ |
| OLD | NEW |