summaryrefslogtreecommitdiff
path: root/clang/test/CodeGenObjC/objc2-no-write-barrier.m
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CodeGenObjC/objc2-no-write-barrier.m')
-rw-r--r--clang/test/CodeGenObjC/objc2-no-write-barrier.m20
1 files changed, 20 insertions, 0 deletions
diff --git a/clang/test/CodeGenObjC/objc2-no-write-barrier.m b/clang/test/CodeGenObjC/objc2-no-write-barrier.m
new file mode 100644
index 0000000..d439368
--- /dev/null
+++ b/clang/test/CodeGenObjC/objc2-no-write-barrier.m
@@ -0,0 +1,20 @@
+// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -fobjc-fragile-abi -fobjc-gc -emit-llvm -o %t %s
+// RUN: grep 'objc_assign' %t | count 0
+// RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin9 -fobjc-fragile-abi -fobjc-gc -emit-llvm -o %t %s
+// RUN: grep 'objc_assign' %t | count 0
+
+typedef struct {
+ int ival;
+ id submenu;
+} XCBinderContextMenuItem;
+
+id actionMenuForDataNode(void) {
+ XCBinderContextMenuItem menusToCreate[] = {
+ {1, 0}
+ };
+ return 0;
+}
+
+XCBinderContextMenuItem GmenusToCreate[] = {
+ {1, 0}
+};