diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-04-16 16:02:28 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-04-16 16:02:28 +0000 |
commit | 7442d6faa2719e4e7d33a7021c406c5a4facd74d (patch) | |
tree | c72b9241553fc9966179aba84f90f17bfa9235c3 /test/CodeGenObjCXX/lambda-expressions.mm | |
parent | b52119637f743680a99710ce5fdb6646da2772af (diff) |
Diffstat (limited to 'test/CodeGenObjCXX/lambda-expressions.mm')
-rw-r--r-- | test/CodeGenObjCXX/lambda-expressions.mm | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/CodeGenObjCXX/lambda-expressions.mm b/test/CodeGenObjCXX/lambda-expressions.mm index 7ac7a2137fb47..c8247e2e0a26a 100644 --- a/test/CodeGenObjCXX/lambda-expressions.mm +++ b/test/CodeGenObjCXX/lambda-expressions.mm @@ -71,6 +71,10 @@ void take_block(void (^block)()) { block(); } // ARC: %[[CAPTURE1:.*]] = getelementptr inbounds <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i32 }>, <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i32 }>* %[[BLOCK]], i32 0, i32 5 // ARC: store i32 %{{.*}}, i32* %[[CAPTURE1]] +// ARC-LABEL: define internal void @"_ZZ10-[Foo foo]ENK3$_4clEv"( +// ARC-NOT: @objc_storeStrong( +// ARC: ret void + // ARC: define internal void @"___ZZN13LambdaCapture4foo1ERiENK3$_3clEv_block_invoke" // ARC: %[[CAPTURE2:.*]] = getelementptr inbounds <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i32 }>, <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i32 }>* %{{.*}}, i32 0, i32 5 // ARC: store i32 %{{.*}}, i32* %[[CAPTURE2]] @@ -124,6 +128,15 @@ namespace BlockInLambda { }; } +@interface NSObject @end +@interface Foo : NSObject @end +@implementation Foo +- (void)foo { + [&] { + ^{ (void)self; }(); + }(); +} +@end // ARC: attributes [[NUW]] = { noinline nounwind{{.*}} } // MRC: attributes [[NUW]] = { noinline nounwind{{.*}} } |