annotate libsanitizer/ubsan/ubsan_platform.h @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 //===-- ubsan_platform.h ----------------------------------------*- C++ -*-===//
kono
parents:
diff changeset
2 //
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
4 // See https://llvm.org/LICENSE.txt for license information.
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
111
kono
parents:
diff changeset
6 //
kono
parents:
diff changeset
7 //===----------------------------------------------------------------------===//
kono
parents:
diff changeset
8 //
kono
parents:
diff changeset
9 // Defines the platforms which UBSan is supported at.
kono
parents:
diff changeset
10 //
kono
parents:
diff changeset
11 //===----------------------------------------------------------------------===//
kono
parents:
diff changeset
12 #ifndef UBSAN_PLATFORM_H
kono
parents:
diff changeset
13 #define UBSAN_PLATFORM_H
kono
parents:
diff changeset
14
kono
parents:
diff changeset
15 #ifndef CAN_SANITIZE_UB
kono
parents:
diff changeset
16 // Other platforms should be easy to add, and probably work as-is.
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
17 #if defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__) || \
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
18 defined(__NetBSD__) || defined(__OpenBSD__) || \
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
19 (defined(__sun__) && defined(__svr4__)) || \
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
20 defined(_WIN32) || defined(__Fuchsia__) || defined(__rtems__)
111
kono
parents:
diff changeset
21 # define CAN_SANITIZE_UB 1
kono
parents:
diff changeset
22 #else
kono
parents:
diff changeset
23 # define CAN_SANITIZE_UB 0
kono
parents:
diff changeset
24 #endif
kono
parents:
diff changeset
25 #endif //CAN_SANITIZE_UB
kono
parents:
diff changeset
26
kono
parents:
diff changeset
27 #endif