xref: /freebsd/contrib/llvm-project/compiler-rt/lib/gwp_asan/definitions.h (revision ebacd8013fe5f7fdf9f6a5b286f6680dd2891036)
1 //===-- definitions.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 #ifndef GWP_ASAN_DEFINITIONS_H_
10 #define GWP_ASAN_DEFINITIONS_H_
11 
12 #define GWP_ASAN_TLS_INITIAL_EXEC                                              \
13   __thread __attribute__((tls_model("initial-exec")))
14 
15 #define GWP_ASAN_UNLIKELY(X) __builtin_expect(!!(X), 0)
16 #define GWP_ASAN_ALWAYS_INLINE inline __attribute__((always_inline))
17 
18 #define GWP_ASAN_WEAK __attribute__((weak))
19 
20 #endif // GWP_ASAN_DEFINITIONS_H_
21