diff options
Diffstat (limited to 'test/CodeGenObjC/runtime-abi-match.m')
| -rw-r--r-- | test/CodeGenObjC/runtime-abi-match.m | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/CodeGenObjC/runtime-abi-match.m b/test/CodeGenObjC/runtime-abi-match.m new file mode 100644 index 0000000000000..ef391724ece0c --- /dev/null +++ b/test/CodeGenObjC/runtime-abi-match.m @@ -0,0 +1,25 @@ +// RUN: %clang -target armv7-windows -fobjc-runtime=ios -O1 -fexceptions -S -emit-llvm %s -o - | FileCheck %s +// REQUIRES: arm-registered-target + +void (*f)(id); +void (*g)(void); +void h(void); + +@interface NSNumber ++ (NSNumber *)numberWithInt:(int)i; +@end + +void i(void) { + @try { + @throw(@1); + } @catch (id i) { + (*f)(i); + (*g)(); + } +} + +// CHECK: call arm_aapcs_vfpcc i8* @objc_begin_catch +// CHECK: call arm_aapcs_vfpcc void @objc_end_catch +// CHECK-NOT: call i8* @objc_begin_catch +// CHECK-NOT: call void @objc_end_catch + |
