This adds -no-opaque-pointers to clang tests whose output will change when opaque pointers are enabled by default. This is intended to be part of the migration approach described in https://discourse.llvm.org/t/enabling-opaque-pointers-by-default/61322/9. The patch has been produced by replacing %clang_cc1 with %clang_cc1 -no-opaque-pointers for tests that fail with opaque pointers enabled. Worth noting that this doesn't cover all tests, there's a remaining ~40 tests not using %clang_cc1 that will need a followup change. Differential Revision: https://reviews.llvm.org/D123115
21 lines
972 B
Objective-C
21 lines
972 B
Objective-C
// RUN: %clang_cc1 -no-opaque-pointers -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
|
|
|
|
// rdar://problem/23559789
|
|
// 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 [[B:%.*]]**, align 8
|
|
// CHECK: [[DEST:%.*]] = alloca [[A:%.*]]*, align 8
|
|
// CHECK: [[T0:%.*]] = load [[B]]**, [[B]]*** [[SRC]], align 8
|
|
// CHECK-NEXT: [[T1:%.*]] = bitcast [[B]]** [[T0]] to [[A]]**
|
|
// CHECK-NEXT: [[T2:%.*]] = bitcast [[A]]** [[DEST]] to i8**
|
|
// CHECK-NEXT: [[T3:%.*]] = bitcast [[A]]** [[T1]] to i8**
|
|
// CHECK-NEXT: call void @llvm.objc.copyWeak(i8** [[T2]], i8** [[T3]])
|
|
// CHECK-NEXT: [[T0:%.*]] = bitcast [[A]]** [[DEST]] to i8**
|
|
// CHECK: call void @llvm.objc.destroyWeak(i8** [[T0]])
|