• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #define STRIP_PC(pc) ((uptr)ptrauth_strip(pc, 0))
22 
23 #endif // SANITIZER_PTRAUTH_H
24