annotate libsanitizer/ubsan/ubsan_platform.h @ 138:fc828634a951

merge
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Thu, 08 Nov 2018 14:17:14 +0900
parents 04ced10e8804
children 1830386684a0
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 //
kono
parents:
diff changeset
3 // This file is distributed under the University of Illinois Open Source
kono
parents:
diff changeset
4 // License. See LICENSE.TXT for details.
kono
parents:
diff changeset
5 //
kono
parents:
diff changeset
6 //===----------------------------------------------------------------------===//
kono
parents:
diff changeset
7 //
kono
parents:
diff changeset
8 // Defines the platforms which UBSan is supported at.
kono
parents:
diff changeset
9 //
kono
parents:
diff changeset
10 //===----------------------------------------------------------------------===//
kono
parents:
diff changeset
11 #ifndef UBSAN_PLATFORM_H
kono
parents:
diff changeset
12 #define UBSAN_PLATFORM_H
kono
parents:
diff changeset
13
kono
parents:
diff changeset
14 #ifndef CAN_SANITIZE_UB
kono
parents:
diff changeset
15 // Other platforms should be easy to add, and probably work as-is.
kono
parents:
diff changeset
16 #if (defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__) || \
kono
parents:
diff changeset
17 defined(__NetBSD__)) && \
kono
parents:
diff changeset
18 (defined(__x86_64__) || defined(__i386__) || defined(__arm__) || \
kono
parents:
diff changeset
19 defined(__aarch64__) || defined(__mips__) || defined(__powerpc64__) || \
kono
parents:
diff changeset
20 defined(__s390__))
kono
parents:
diff changeset
21 # define CAN_SANITIZE_UB 1
kono
parents:
diff changeset
22 #elif defined(_WIN32) || defined(__Fuchsia__)
kono
parents:
diff changeset
23 # define CAN_SANITIZE_UB 1
kono
parents:
diff changeset
24 #else
kono
parents:
diff changeset
25 # define CAN_SANITIZE_UB 0
kono
parents:
diff changeset
26 #endif
kono
parents:
diff changeset
27 #endif //CAN_SANITIZE_UB
kono
parents:
diff changeset
28
kono
parents:
diff changeset
29 #endif