[cfe-commits] r104176 - in /cfe/trunk/test/CodeGenObjC: atomic-aggregate-property.m blocks-1.m blocks-2.m ivar-layout-64-bitfields.m ivar-layout-64.m ivar-layout-no-optimize.m

Fariborz Jahanian fjahanian at apple.com
Wed May 19 16:07:55 PDT 2010


Author: fjahanian
Date: Wed May 19 18:07:54 2010
New Revision: 104176

URL: http://llvm.org/viewvc/llvm-project?rev=104176&view=rev
Log:
More tests for ObjC++ GC support.


Modified:
    cfe/trunk/test/CodeGenObjC/atomic-aggregate-property.m
    cfe/trunk/test/CodeGenObjC/blocks-1.m
    cfe/trunk/test/CodeGenObjC/blocks-2.m
    cfe/trunk/test/CodeGenObjC/ivar-layout-64-bitfields.m
    cfe/trunk/test/CodeGenObjC/ivar-layout-64.m
    cfe/trunk/test/CodeGenObjC/ivar-layout-no-optimize.m

Modified: cfe/trunk/test/CodeGenObjC/atomic-aggregate-property.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/atomic-aggregate-property.m?rev=104176&r1=104175&r2=104176&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/atomic-aggregate-property.m (original)
+++ cfe/trunk/test/CodeGenObjC/atomic-aggregate-property.m Wed May 19 18:07:54 2010
@@ -1,4 +1,5 @@
 // RUN: %clang_cc1 -triple x86_64-apple-darwin10  -fobjc-nonfragile-abi -fobjc-gc -emit-llvm -o - %s | FileCheck -check-prefix LP64 %s
+// RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin10  -fobjc-nonfragile-abi -fobjc-gc -emit-llvm -o - %s | FileCheck -check-prefix LP64 %s
 // rdar: // 7849824
 
 struct s {

Modified: cfe/trunk/test/CodeGenObjC/blocks-1.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/blocks-1.m?rev=104176&r1=104175&r2=104176&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/blocks-1.m (original)
+++ cfe/trunk/test/CodeGenObjC/blocks-1.m Wed May 19 18:07:54 2010
@@ -8,6 +8,16 @@
 // RUN: grep "_Block_object_assign" %t | count 4
 // RUN: grep "objc_read_weak" %t | count 2
 // RUN: grep "objc_assign_weak" %t | count 3
+// RUN: %clang_cc1 -x objective-c++ %s -emit-llvm -o %t -fobjc-gc -fblocks -triple i386-apple-darwin10
+// RUN: grep "_Block_object_dispose" %t | count 6
+// RUN: grep "__copy_helper_block_" %t | count 4
+// RUN: grep "__destroy_helper_block_" %t | count 4
+// RUN: grep "__Block_byref_id_object_copy_" %t | count 2
+// RUN: grep "__Block_byref_id_object_dispose_" %t | count 2
+// RUN: grep "i32 135)" %t | count 0
+// RUN: grep "_Block_object_assign" %t | count 4
+// RUN: grep "objc_read_weak" %t | count 2
+// RUN: grep "objc_assign_weak" %t | count 3
 
 @interface NSDictionary @end
 

Modified: cfe/trunk/test/CodeGenObjC/blocks-2.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/blocks-2.m?rev=104176&r1=104175&r2=104176&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/blocks-2.m (original)
+++ cfe/trunk/test/CodeGenObjC/blocks-2.m Wed May 19 18:07:54 2010
@@ -1,5 +1,7 @@
 // RUN: %clang_cc1 %s -emit-llvm -o %t -fobjc-gc -fblocks -triple i386-apple-darwin10
 // RUN: grep "objc_assign_strongCast" %t | count 2
+// RUN: %clang_cc1 -x objective-c++ %s -emit-llvm -o %t -fobjc-gc -fblocks -triple i386-apple-darwin10
+// RUN: grep "objc_assign_strongCast" %t | count 2
 
 // This should generate a strong cast.
 

Modified: cfe/trunk/test/CodeGenObjC/ivar-layout-64-bitfields.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/ivar-layout-64-bitfields.m?rev=104176&r1=104175&r2=104176&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/ivar-layout-64-bitfields.m (original)
+++ cfe/trunk/test/CodeGenObjC/ivar-layout-64-bitfields.m Wed May 19 18:07:54 2010
@@ -1,4 +1,5 @@
 // RUN: %clang_cc1 -triple x86_64-apple-darwin9 -fobjc-gc -emit-llvm -o %t %s
+// RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin9 -fobjc-gc -emit-llvm -o %t %s
 @interface I
 {
   struct {

Modified: cfe/trunk/test/CodeGenObjC/ivar-layout-64.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/ivar-layout-64.m?rev=104176&r1=104175&r2=104176&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/ivar-layout-64.m (original)
+++ cfe/trunk/test/CodeGenObjC/ivar-layout-64.m Wed May 19 18:07:54 2010
@@ -4,6 +4,12 @@
 // RUN: grep '@"\\01L_OBJC_CLASS_NAME_.*" = internal global .* c"\\11q\\10\\00"' %t
 // RUN: grep '@"\\01L_OBJC_CLASS_NAME_.*" = internal global .* c"!q\\00"' %t
 // RUN: grep '@"\\01L_OBJC_CLASS_NAME_.*" = internal global .* c"\\01\\14\\00"' %t
+// RUNX: llvm-gcc -ObjC++ -m64 -fobjc-gc -emit-llvm -S -o %t %s &&
+// RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fobjc-gc -emit-llvm -o %t %s
+// RUN: grep '@"\\01L_OBJC_CLASS_NAME_.*" = internal global .* c"A\\00"' %t
+// RUN: grep '@"\\01L_OBJC_CLASS_NAME_.*" = internal global .* c"\\11q\\10\\00"' %t
+// RUN: grep '@"\\01L_OBJC_CLASS_NAME_.*" = internal global .* c"!q\\00"' %t
+// RUN: grep '@"\\01L_OBJC_CLASS_NAME_.*" = internal global .* c"\\01\\14\\00"' %t
 
 /*
 

Modified: cfe/trunk/test/CodeGenObjC/ivar-layout-no-optimize.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/ivar-layout-no-optimize.m?rev=104176&r1=104175&r2=104176&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/ivar-layout-no-optimize.m (original)
+++ cfe/trunk/test/CodeGenObjC/ivar-layout-no-optimize.m Wed May 19 18:07:54 2010
@@ -1,5 +1,7 @@
 // RUN: %clang_cc1 -fobjc-gc -triple x86_64-apple-darwin -O0 -S %s -o %t-64.s
 // RUN: FileCheck -check-prefix LP64 --input-file=%t-64.s %s
+// RUN: %clang_cc1 -x objective-c++ -fobjc-gc -triple x86_64-apple-darwin -O0 -S %s -o %t-64.s
+// RUN: FileCheck -check-prefix LP64 --input-file=%t-64.s %s
 
 @interface NSObject {
   id isa;





More information about the cfe-commits mailing list