12eb6e30fSAhmed Bougacha // RUN: %clang_cc1 -triple arm64-apple-ios -emit-llvm %s -o - | FileCheck %s --check-prefixes=ALL,OFF 2e23250ecSAhmed Bougacha // RUN: %clang_cc1 -triple arm64e-apple-ios -emit-llvm %s -o - | FileCheck %s --check-prefixes=ALL,OFF 3e23250ecSAhmed Bougacha // RUN: %clang_cc1 -triple aarch64-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefixes=ALL,OFF 4e23250ecSAhmed Bougacha 5e23250ecSAhmed Bougacha // RUN: %clang_cc1 -triple arm64-apple-ios -fptrauth-calls -emit-llvm %s -o - | FileCheck %s --check-prefixes=ALL,CALLS 6e23250ecSAhmed Bougacha // RUN: %clang_cc1 -triple aarch64-linux-gnu -fptrauth-calls -emit-llvm %s -o - | FileCheck %s --check-prefixes=ALL,CALLS 7e23250ecSAhmed Bougacha 82eb6e30fSAhmed Bougacha // RUN: %clang_cc1 -triple arm64-apple-ios -fptrauth-returns -emit-llvm %s -o - | FileCheck %s --check-prefixes=ALL,RETS 92eb6e30fSAhmed Bougacha // RUN: %clang_cc1 -triple aarch64-linux-gnu -fptrauth-returns -emit-llvm %s -o - | FileCheck %s --check-prefixes=ALL,RETS 102eb6e30fSAhmed Bougacha 11d179acd0SAhmed Bougacha // RUN: %clang_cc1 -triple arm64-apple-ios -fptrauth-auth-traps -emit-llvm %s -o - | FileCheck %s --check-prefixes=ALL,TRAPS 12d179acd0SAhmed Bougacha // RUN: %clang_cc1 -triple aarch64-linux-gnu -fptrauth-auth-traps -emit-llvm %s -o - | FileCheck %s --check-prefixes=ALL,TRAPS 13d179acd0SAhmed Bougacha 14b8721fa0SAhmed Bougacha // RUN: %clang_cc1 -triple arm64-apple-ios -fptrauth-indirect-gotos -emit-llvm %s -o - | FileCheck %s --check-prefixes=ALL,GOTOS 1570c6e79eSDaniil Kovalev // RUN: %clang_cc1 -triple aarch64-linux-gnu -fptrauth-indirect-gotos -emit-llvm %s -o - | FileCheck %s --check-prefixes=ALL,GOTOS 16b8721fa0SAhmed Bougacha 17*41cde465SDaniil Kovalev // RUN: %clang_cc1 -triple arm64e-apple-ios -faarch64-jump-table-hardening -emit-llvm %s -o - | FileCheck %s --check-prefixes=ALL,JMPTBL 18*41cde465SDaniil Kovalev // RUN: %clang_cc1 -triple aarch64-linux-gnu -faarch64-jump-table-hardening -emit-llvm %s -o - | FileCheck %s --check-prefixes=ALL,JMPTBL 19*41cde465SDaniil Kovalev 20e23250ecSAhmed Bougacha // ALL: define {{(dso_local )?}}void @test() #0 21e23250ecSAhmed Bougacha void test() { 22e23250ecSAhmed Bougacha } 23e23250ecSAhmed Bougacha 24e23250ecSAhmed Bougacha // CALLS: attributes #0 = {{{.*}} "ptrauth-calls" {{.*}}} 25e23250ecSAhmed Bougacha 262eb6e30fSAhmed Bougacha // RETS: attributes #0 = {{{.*}} "ptrauth-returns" {{.*}}} 272eb6e30fSAhmed Bougacha 28d179acd0SAhmed Bougacha // TRAPS: attributes #0 = {{{.*}} "ptrauth-auth-traps" {{.*}}} 29d179acd0SAhmed Bougacha 30b8721fa0SAhmed Bougacha // GOTOS: attributes #0 = {{{.*}} "ptrauth-indirect-gotos" {{.*}}} 31b8721fa0SAhmed Bougacha 32*41cde465SDaniil Kovalev // JMPTBL: attributes #0 = {{{.*}} "aarch64-jump-table-hardening" {{.*}}} 33*41cde465SDaniil Kovalev 34e23250ecSAhmed Bougacha // OFF-NOT: attributes {{.*}} "ptrauth- 35