This reverts commit d618f1c3b12effd0c2bdb7d02108d3551f389d3d. This commit wasn't reviewed ahead of time and significant concerns were raised immediately after it landed. According to our developer policy this warrants immediate revert of the commit. https://llvm.org/docs/DeveloperPolicy.html#patch-reversion-policy Differential Revision: https://reviews.llvm.org/D155509
19 lines
857 B
Objective-C
19 lines
857 B
Objective-C
// RUN: %clang_cc1 %s -emit-llvm -o - -fblocks -triple x86_64-apple-darwin10 -fobjc-runtime=macosx-fragile-10.5 | FileCheck %s
|
|
// rdar://8893785
|
|
|
|
void MYFUNC(void) {
|
|
// CHECK-LABEL: define{{.*}} void @MYFUNC()
|
|
// CHECK: [[OBSERVER_SLOT:%.*]] = alloca [[OBSERVER_T:%.*]], align 8
|
|
// CHECK: [[BLOCK:%.*]] = alloca <{
|
|
|
|
// CHECK: [[T0:%.*]] = getelementptr inbounds [[OBSERVER_T]], ptr [[OBSERVER_SLOT]], i32 0, i32 1
|
|
// CHECK: store ptr [[OBSERVER_SLOT]], ptr [[T0]]
|
|
|
|
// CHECK: [[FORWARDING:%.*]] = getelementptr inbounds [[OBSERVER_T]], ptr [[OBSERVER_SLOT]], i32 0, i32 1
|
|
// CHECK-NEXT: [[T0:%.*]] = load ptr, ptr [[FORWARDING]]
|
|
// CHECK-NEXT: [[OBSERVER:%.*]] = getelementptr inbounds [[OBSERVER_T]], ptr [[T0]], i32 0, i32 6
|
|
// CHECK-NEXT: store ptr [[BLOCK]], ptr [[OBSERVER]]
|
|
__block id observer = ^{ return observer; };
|
|
}
|
|
|