32 lines · c
1//===-- xray_defs.h ---------------------------------------------*- C++ -*-===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8//9// Common definitions useful for XRay sources.10//11//===----------------------------------------------------------------------===//12#ifndef XRAY_XRAY_DEFS_H13#define XRAY_XRAY_DEFS_H14 15#if XRAY_SUPPORTED16#define XRAY_NEVER_INSTRUMENT __attribute__((xray_never_instrument))17#else18#define XRAY_NEVER_INSTRUMENT19#endif20 21#if SANITIZER_NETBSD22// NetBSD: thread_local is not aligned properly, and the code relying23// on it segfaults24#define XRAY_TLS_ALIGNAS(x)25#define XRAY_HAS_TLS_ALIGNAS 026#else27#define XRAY_TLS_ALIGNAS(x) alignas(x)28#define XRAY_HAS_TLS_ALIGNAS 129#endif30 31#endif // XRAY_XRAY_DEFS_H32