Fangrui Song | a44c434 | 2020-01-04 15:39:19 -0800 | [diff] [blame^] | 1 | // RUN: %clang_cc1 -triple aarch64 -emit-llvm %s -o - | FileCheck %s |
| 2 | |
| 3 | // CHECK: define void @f0() #0 |
| 4 | __attribute__((patchable_function_entry(0))) void f0() {} |
| 5 | |
| 6 | // CHECK: define void @f00() #0 |
| 7 | __attribute__((patchable_function_entry(0, 0))) void f00() {} |
| 8 | |
| 9 | // CHECK: define void @f2() #1 |
| 10 | __attribute__((patchable_function_entry(2))) void f2() {} |
| 11 | |
| 12 | // CHECK: define void @f20() #1 |
| 13 | __attribute__((patchable_function_entry(2, 0))) void f20() {} |
| 14 | |
| 15 | // CHECK: define void @f20decl() #1 |
| 16 | __attribute__((patchable_function_entry(2, 0))) void f20decl(); |
| 17 | void f20decl() {} |
| 18 | |
| 19 | /// M in patchable_function_entry(N,M) is currently ignored. |
| 20 | // CHECK: attributes #0 = { {{.*}} "patchable-function-entry"="0" |
| 21 | // CHECK: attributes #1 = { {{.*}} "patchable-function-entry"="2" |