Files
clang-p2996/clang/test/CodeGenObjC/arc-weak.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

16 lines
655 B
Objective-C

// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -fblocks -fobjc-arc -fobjc-runtime-has-weak -o - %s | FileCheck %s
__attribute((objc_root_class)) @interface A @end
@interface B : A @end
// Ensure that type differences don't cause an assert here.
void test0(__weak B **src) {
__weak A *dest = *src;
}
// CHECK-LABEL: define{{.*}} void @test0
// CHECK: [[SRC:%.*]] = alloca ptr, align 8
// CHECK: [[DEST:%.*]] = alloca ptr, align 8
// CHECK: [[T0:%.*]] = load ptr, ptr [[SRC]], align 8
// CHECK-NEXT: call void @llvm.objc.copyWeak(ptr [[DEST]], ptr [[T0]])
// CHECK: call void @llvm.objc.destroyWeak(ptr [[DEST]])