diff options
Diffstat (limited to 'clang/test/CodeGen/patchable-function-entry.c')
-rw-r--r-- | clang/test/CodeGen/patchable-function-entry.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/clang/test/CodeGen/patchable-function-entry.c b/clang/test/CodeGen/patchable-function-entry.c index 50b96ea883a..f41f12d0669 100644 --- a/clang/test/CodeGen/patchable-function-entry.c +++ b/clang/test/CodeGen/patchable-function-entry.c @@ -17,10 +17,20 @@ __attribute__((patchable_function_entry(2, 0))) void f20() {} __attribute__((patchable_function_entry(2, 0))) void f20decl(); void f20decl() {} -// OPT: define void @f() #2 +// CHECK: define void @f44() #2 +__attribute__((patchable_function_entry(4, 4))) void f44() {} + +// CHECK: define void @f52() #3 +__attribute__((patchable_function_entry(5, 2))) void f52() {} + +// OPT: define void @f() #4 void f() {} -/// M in patchable_function_entry(N,M) is currently ignored. -// CHECK: attributes #0 = { {{.*}} "patchable-function-entry"="0" +/// No need to emit "patchable-function-entry"="0" +// CHECK: attributes #0 = { {{.*}} +// CHECK-NOT: "patchable-function-entry" + // CHECK: attributes #1 = { {{.*}} "patchable-function-entry"="2" -// OPT: attributes #2 = { {{.*}} "patchable-function-entry"="1" +// CHECK: attributes #2 = { {{.*}} "patchable-function-entry"="0" "patchable-function-prefix"="4" +// CHECK: attributes #3 = { {{.*}} "patchable-function-entry"="3" "patchable-function-prefix"="2" +// OPT: attributes #4 = { {{.*}} "patchable-function-entry"="1" |