Path: blob/main/contrib/llvm-project/compiler-rt/lib/ubsan/ubsan_platform.h
35233 views
//===-- ubsan_platform.h ----------------------------------------*- C++ -*-===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//7//8// Defines the platforms which UBSan is supported at.9//10//===----------------------------------------------------------------------===//11#ifndef UBSAN_PLATFORM_H12#define UBSAN_PLATFORM_H1314// Other platforms should be easy to add, and probably work as-is.15#if defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__) || \16defined(__NetBSD__) || defined(__DragonFly__) || \17(defined(__sun__) && defined(__svr4__)) || defined(_WIN32) || \18defined(__Fuchsia__)19#define CAN_SANITIZE_UB 120#else21# define CAN_SANITIZE_UB 022#endif2324#endif252627