diff options
author | Akira Hatanaka <ahatanaka@apple.com> | 2018-03-12 17:05:06 +0000 |
---|---|---|
committer | Akira Hatanaka <ahatanaka@apple.com> | 2018-03-12 17:05:06 +0000 |
commit | be7daa3d50e8a65e6bba6b522768ca225b818c39 (patch) | |
tree | 5f807d6ceabb3a1905d891ad6c85fdd7cc7c84db /clang/test/CodeGenObjC/nontrivial-c-struct-exception.m | |
parent | 144b0c8036e1edac15ff1a69faa31eb23c1eef3f (diff) | |
download | bcm5719-llvm-be7daa3d50e8a65e6bba6b522768ca225b818c39.tar.gz bcm5719-llvm-be7daa3d50e8a65e6bba6b522768ca225b818c39.zip |
Revert "[ObjC] Allow declaring __weak pointer fields in C structs in
ARC."
This reverts commit r327206 as there were test failures caused by this
patch.
http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20180312/221427.html
llvm-svn: 327294
Diffstat (limited to 'clang/test/CodeGenObjC/nontrivial-c-struct-exception.m')
-rw-r--r-- | clang/test/CodeGenObjC/nontrivial-c-struct-exception.m | 31 |
1 files changed, 1 insertions, 30 deletions
diff --git a/clang/test/CodeGenObjC/nontrivial-c-struct-exception.m b/clang/test/CodeGenObjC/nontrivial-c-struct-exception.m index 7db53bb7424..a926a6d493b 100644 --- a/clang/test/CodeGenObjC/nontrivial-c-struct-exception.m +++ b/clang/test/CodeGenObjC/nontrivial-c-struct-exception.m @@ -1,18 +1,12 @@ -// RUN: %clang_cc1 -triple arm64-apple-ios11 -fobjc-arc -fblocks -fobjc-runtime=ios-11.0 -fobjc-exceptions -fexceptions -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple arm64-apple-ios11 -fobjc-arc -fblocks -fobjc-runtime=ios-11.0 -fobjc-exceptions -fexceptions -fobjc-arc-exceptions -emit-llvm -o - %s | FileCheck %s // CHECK: %[[STRUCT_STRONG:.*]] = type { i32, i8* } -// CHECK: %[[STRUCT_WEAK:.*]] = type { i32, i8* } typedef struct { int i; id f1; } Strong; -typedef struct { - int i; - __weak id f1; -} Weak; - // CHECK: define void @testStrongException() // CHECK: %[[AGG_TMP:.*]] = alloca %[[STRUCT_STRONG]], align 8 // CHECK: %[[AGG_TMP1:.*]] = alloca %[[STRUCT_STRONG]], align 8 @@ -37,26 +31,3 @@ void calleeStrong(Strong, Strong); void testStrongException(void) { calleeStrong(genStrong(), genStrong()); } - -// CHECK: define void @testWeakException() -// CHECK: %[[AGG_TMP:.*]] = alloca %[[STRUCT_WEAK]], align 8 -// CHECK: %[[AGG_TMP1:.*]] = alloca %[[STRUCT_WEAK]], align 8 -// CHECK: call void @genWeak(%[[STRUCT_WEAK]]* sret %[[AGG_TMP]]) -// CHECK: invoke void @genWeak(%[[STRUCT_WEAK]]* sret %[[AGG_TMP1]]) - -// CHECK: call void @calleeWeak(%[[STRUCT_WEAK]]* %[[AGG_TMP]], %[[STRUCT_WEAK]]* %[[AGG_TMP1]]) -// CHECK: ret void - -// CHECK: landingpad { i8*, i32 } -// CHECK: %[[V3:.*]] = bitcast %[[STRUCT_WEAK]]* %[[AGG_TMP]] to i8** -// CHECK: call void @__destructor_8_w8(i8** %[[V3]]) -// CHECK: br label - -// CHECK: resume - -Weak genWeak(void); -void calleeWeak(Weak, Weak); - -void testWeakException(void) { - calleeWeak(genWeak(), genWeak()); -} |