mirror of
https://github.com/dart-lang/sdk
synced 2024-09-21 03:13:14 +00:00
d67f159332
TEST=local Change-Id: Icb47e2c68e55ae14f806cb421b8d860cda4d1f1c Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350647 Reviewed-by: Alexander Aprelev <aam@google.com> Commit-Queue: Ryan Macnak <rmacnak@google.com>
23 lines
769 B
C
23 lines
769 B
C
// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
#ifndef RUNTIME_PLATFORM_UNDEFINED_BEHAVIOR_SANITIZER_H_
|
|
#define RUNTIME_PLATFORM_UNDEFINED_BEHAVIOR_SANITIZER_H_
|
|
|
|
#if __SANITIZE_UNDEFINED__
|
|
#define USING_UNDEFINED_BEHAVIOR_SANITIZER
|
|
#elif defined(__has_feature)
|
|
#if __has_feature(undefined_behavior_sanitizer)
|
|
#define USING_UNDEFINED_BEHAVIOR_SANITIZER
|
|
#endif
|
|
#endif
|
|
|
|
#if defined(USING_UNDEFINED_BEHAVIOR_SANITIZER)
|
|
#define NO_SANITIZE_UNDEFINED(check) __attribute__((no_sanitize(check)))
|
|
#else
|
|
#define NO_SANITIZE_UNDEFINED(check)
|
|
#endif
|
|
|
|
#endif // RUNTIME_PLATFORM_UNDEFINED_BEHAVIOR_SANITIZER_H_
|