1 // RUN: %clang_cc1 -triple aarch64 -emit-llvm %s -o - | FileCheck %s 2 // RUN: %clang_cc1 -triple x86_64 -emit-llvm %s -fpatchable-function-entry=1 -o - | FileCheck --check-prefixes=CHECK,OPT %s 3 4 // CHECK: define void @f0() #0 5 __attribute__((patchable_function_entry(0))) void f0() {} 6 7 // CHECK: define void @f00() #0 8 __attribute__((patchable_function_entry(0, 0))) void f00() {} 9 10 // CHECK: define void @f2() #1 11 __attribute__((patchable_function_entry(2))) void f2() {} 12 13 // CHECK: define void @f20() #1 14 __attribute__((patchable_function_entry(2, 0))) void f20() {} 15 16 // CHECK: define void @f20decl() #1 17 __attribute__((patchable_function_entry(2, 0))) void f20decl(); 18 void f20decl() {} 19 20 // OPT: define void @f() #2 21 void f() {} 22 23 /// M in patchable_function_entry(N,M) is currently ignored. 24 // CHECK: attributes #0 = { {{.*}} "patchable-function-entry"="0" 25 // CHECK: attributes #1 = { {{.*}} "patchable-function-entry"="2" 26 // OPT: attributes #2 = { {{.*}} "patchable-function-entry"="1" 27