brintos

brintos / llvm-project-archived public Read only

0
0
Text · 467 B · 1f53747 Raw
13 lines · c
1// RUN: %clang_cc1 -triple arm64-apple-ios -fptrauth-calls -fptrauth-intrinsics -emit-llvm %s  -o - | FileCheck %s2// RUN: %clang_cc1 -triple aarch64-linux-gnu -fptrauth-calls -fptrauth-intrinsics -emit-llvm %s  -o - | FileCheck %s3 4extern void foo() __attribute__((weak_import));5 6// CHECK: define {{(dso_local )?}}void @bar()7// CHECK: [[TMP1:%.*]] =  icmp ne ptr ptrauth (ptr @foo, i32 0), null8// CHECK: br i1 [[TMP1]], label9void bar() {10  if (foo)11    foo();12}13