// REQUIRES: aarch64-registered-target
// RUN: %clang_cc1 -triple aarch64-unknown-unknown-eabi -emit-llvm -target-cpu generic -target-feature +v8.5a %s -o - \
// RUN: | FileCheck %s --check-prefix=CHECK
void
// CHECK: define{{.*}} void @none() #[[#NONE:]]
void
// CHECK: define{{.*}} void @std() #[[#STD:]]
void
// CHECK: define{{.*}} void @btionly() #[[#BTI:]]
void
// CHECK: define{{.*}} void @paconly() #[[#PAC:]]
void
// CHECK: define{{.*}} void @pacbti0() #[[#PACBTI:]]
void
// CHECK: define{{.*}} void @pacbti1() #[[#PACBTI]]
void
// CHECK: define{{.*}} void @leaf() #[[#PACLEAF:]]
void
// CHECK: define{{.*}} void @bkey() #[[#PACBKEY:]]
void
// CHECK: define{{.*}} void @bkeyleaf0() #[[#PACBKEYLEAF:]]
void
// CHECK: define{{.*}} void @bkeyleaf1() #[[#PACBKEYLEAF]]
void
// CHECK: define{{.*}} void @btileaf() #[[#BTIPACLEAF:]]
// CHECK-DAG: attributes #[[#NONE]] = { {{.*}} "branch-target-enforcement"="false" {{.*}} "sign-return-address"="none"
// CHECK-DAG: attributes #[[#STD]] = { {{.*}} "branch-target-enforcement"="true" {{.*}} "sign-return-address"="non-leaf" "sign-return-address-key"="a_key"
// CHECK-DAG: attributes #[[#BTI]] = { {{.*}} "branch-target-enforcement"="true" {{.*}} "sign-return-address"="none"
// CHECK-DAG: attributes #[[#PAC]] = { {{.*}} "branch-target-enforcement"="false" {{.*}} "sign-return-address"="non-leaf" "sign-return-address-key"="a_key"
// CHECK-DAG: attributes #[[#PACLEAF]] = { {{.*}} "branch-target-enforcement"="false" {{.*}}"sign-return-address"="all" "sign-return-address-key"="a_key"
// CHECK-DAG: attributes #[[#PACBKEY]] = { {{.*}}"branch-target-enforcement"="false" {{.*}} "sign-return-address"="non-leaf" "sign-return-address-key"="b_key"
// CHECK-DAG: attributes #[[#PACBKEYLEAF]] = { {{.*}} "branch-target-enforcement"="false" {{.*}}"sign-return-address"="all" "sign-return-address-key"="b_key"
// CHECK-DAG: attributes #[[#BTIPACLEAF]] = { {{.*}}"branch-target-enforcement"="true" {{.*}} "sign-return-address"="all" "sign-return-address-key"="a_key"