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-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// Common definitions useful for XRay sources.
10//
11//===----------------------------------------------------------------------===//
12#ifndef XRAY_XRAY_DEFS_H
13#define XRAY_XRAY_DEFS_H
14
15#if XRAY_SUPPORTED
16#define XRAY_NEVER_INSTRUMENT __attribute__((xray_never_instrument))
17#else
18#define XRAY_NEVER_INSTRUMENT
19#endif
20
21#if SANITIZER_NETBSD
22// NetBSD: thread_local is not aligned properly, and the code relying
23// on it segfaults
24#define XRAY_TLS_ALIGNAS(x)
25#define XRAY_HAS_TLS_ALIGNAS 0
26#else
27#define XRAY_TLS_ALIGNAS(x) alignas(x)
28#define XRAY_HAS_TLS_ALIGNAS 1
29#endif
30
31#endif // XRAY_XRAY_DEFS_H
32

source code of compiler-rt/lib/xray/xray_defs.h