xref: /freebsd/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_ptrauth.h (revision cfd6422a5217410fbd66f7a7a8a64d9d85e61229)
1 //===-- sanitizer_ptrauth.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 SANITIZER_PTRAUTH_H
10 #define SANITIZER_PTRAUTH_H
11 
12 #if __has_feature(ptrauth_calls)
13 #include <ptrauth.h>
14 #else
15 // Copied from <ptrauth.h>
16 #define ptrauth_strip(__value, __key) __value
17 #define ptrauth_auth_data(__value, __old_key, __old_data) __value
18 #define ptrauth_string_discriminator(__string) ((int)0)
19 #endif
20 
21 #endif // SANITIZER_PTRAUTH_H
22