1 | // Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file |
2 | // for details. All rights reserved. Use of this source code is governed by a |
3 | // BSD-style license that can be found in the LICENSE file. |
4 | |
5 | #ifndef RUNTIME_PLATFORM_UNDEFINED_BEHAVIOR_SANITIZER_H_ |
6 | #define RUNTIME_PLATFORM_UNDEFINED_BEHAVIOR_SANITIZER_H_ |
7 | |
8 | #if defined(__has_feature) |
9 | #if __has_feature(undefined_behavior_sanitizer) |
10 | #define USING_UNDEFINED_BEHAVIOR_SANITIZER |
11 | #endif |
12 | #endif |
13 | |
14 | #if defined(USING_UNDEFINED_BEHAVIOR_SANITIZER) |
15 | #define NO_SANITIZE_UNDEFINED(check) __attribute__((no_sanitize(check))) |
16 | #else |
17 | #define NO_SANITIZE_UNDEFINED(check) |
18 | #endif |
19 | |
20 | #endif // RUNTIME_PLATFORM_UNDEFINED_BEHAVIOR_SANITIZER_H_ |
21 | |