blob: d781869f98e3185501477b7c5665feb5c3a3a270 [file] [log] [blame]
Alexey Samsonov0781e982015-03-26 17:26:04 +00001//===-- ubsan_platform.h ----------------------------------------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// Defines the platforms which UBSan is supported at.
11//
12//===----------------------------------------------------------------------===//
13#ifndef UBSAN_PLATFORM_H
14#define UBSAN_PLATFORM_H
15
16// Other platforms should be easy to add, and probably work as-is.
Kamil Rytarowski7cde4672018-02-17 13:35:09 +000017#if defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__) || \
18 defined(__NetBSD__) || (defined(__sun__) && defined(__svr4__)) || \
19 defined(_WIN32) || defined(__Fuchsia__)
Peter Collingbourned3b99172015-07-02 01:44:34 +000020# define CAN_SANITIZE_UB 1
Alexey Samsonov0781e982015-03-26 17:26:04 +000021#else
22# define CAN_SANITIZE_UB 0
Alexey Samsonov0781e982015-03-26 17:26:04 +000023#endif
24
25#endif