Files
clang-p2996/clang/test/CodeGenObjC/block-6.m
Aaron Ballman d618f1c3b1 Remove rdar links; NFC
This removes links to rdar, which is an internal bug tracker that the
community doesn't have visibility into.

See further discussion at:
https://discourse.llvm.org/t/code-review-reminder-about-links-in-code-commit-messages/71847
2023-07-07 08:41:11 -04:00

18 lines
839 B
Objective-C

// RUN: %clang_cc1 %s -emit-llvm -o - -fblocks -triple x86_64-apple-darwin10 -fobjc-runtime=macosx-fragile-10.5 | FileCheck %s
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; };
}