summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenObjC/objc-alloc-init.m
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CodeGenObjC/objc-alloc-init.m')
-rw-r--r--clang/test/CodeGenObjC/objc-alloc-init.m6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/CodeGenObjC/objc-alloc-init.m b/clang/test/CodeGenObjC/objc-alloc-init.m
index 08a383d59f6..c5c1a763b7c 100644
--- a/clang/test/CodeGenObjC/objc-alloc-init.m
+++ b/clang/test/CodeGenObjC/objc-alloc-init.m
@@ -23,14 +23,20 @@ void f() {
@interface Y : X
+(void)meth;
+-(void)instanceMeth;
@end
@implementation Y
+(void)meth {
[[self alloc] init];
+ // OPTIMIZED: call i8* @objc_alloc_init(
+ // NOT_OPTIMIZED: call i8* @objc_alloc(
+}
+-(void)instanceMeth {
// EITHER-NOT: call i8* @objc_alloc
// EITHER: call {{.*}} @objc_msgSend
// EITHER: call {{.*}} @objc_msgSend
+ [[self alloc] init];
}
@end
OpenPOWER on IntegriCloud