brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 3267b07 Raw
36 lines · c
1// RUN: %clang_cc1 -E %s -triple=aarch64 -fptrauth-intrinsics | \2// RUN:   FileCheck %s --check-prefixes=INTRIN3 4// RUN: %clang_cc1 -E %s -triple=aarch64 -fptrauth-calls | \5// RUN:   FileCheck %s --check-prefixes=NOINTRIN6 7// RUN: %clang_cc1 -E %s -DIS_DARWIN -triple=arm64e-apple-darwin -fptrauth-intrinsics | \8// RUN:   FileCheck %s --check-prefixes=INTRIN,INTRIN_MAC9 10// RUN: %clang_cc1 -E %s -DIS_DARWIN -triple=arm64e-apple-darwin -fptrauth-calls | \11// RUN:   FileCheck %s --check-prefixes=NOINTRIN12 13#if defined(IS_DARWIN) && __has_extension(ptrauth_qualifier)14// INTRIN_MAC: has_ptrauth_qualifier115void has_ptrauth_qualifier1() {}16#ifndef __PTRAUTH__17#error ptrauth_qualifier extension present without predefined test macro18#endif19#endif20#if defined(IS_DARWIN) && __has_feature(ptrauth_qualifier)21// INTRIN_MAC: has_ptrauth_qualifier222void has_ptrauth_qualifier2() {}23#ifndef __PTRAUTH__24#error ptrauth_qualifier extension present without predefined test macro25#endif26#endif27#if defined(__PTRAUTH__)28// INTRIN: has_ptrauth_qualifier329void has_ptrauth_qualifier3() {}30#endif31 32#if !defined(__PTRAUTH__) && !__has_feature(ptrauth_qualifier) && !__has_extension(ptrauth_qualifier)33// NOINTRIN: no_ptrauth_qualifier34void no_ptrauth_qualifier() {}35#endif36