brintos

brintos / llvm-project-archived public Read only

0
0
Text · 704 B · b0c069f Raw
26 lines · cpp
1// RUN: %clang_cc1 -triple arm64-apple-ios -fptrauth-calls -emit-llvm -std=c++11 -fexceptions -fcxx-exceptions -o - %s | FileCheck %s2// RUN: %clang_cc1 -triple aarch64-linux-gnu -fptrauth-calls -emit-llvm -std=c++11 -fexceptions -fcxx-exceptions -o - %s | FileCheck %s3 4void f(void);5auto &f_ref = f;6 7// CHECK: define {{(dso_local )?}}void @_Z1gv(8// CHECK: call void ptrauth (ptr @_Z1fv, i32 0)() [ "ptrauth"(i32 0, i64 0) ]9 10void g() { f_ref(); }11 12void foo1();13 14void test_terminate() noexcept {15  foo1();16}17 18// CHECK: define {{(dso_local )?}}void @_ZSt9terminatev() #[[ATTR4:.*]] {19 20namespace std {21  void terminate() noexcept {22  }23}24 25// CHECK: attributes #[[ATTR4]] = {{{.*}}"ptrauth-calls"{{.*}}}26