[arcmt] In GC, change '__weak' -> '__unsafe_unretained' when applied
to objects of classes that don't support ARC weak

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143976 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/ARCMT/GC.m b/test/ARCMT/GC.m
index 470ec64..b3ba2a4 100644
--- a/test/ARCMT/GC.m
+++ b/test/ARCMT/GC.m
@@ -1,7 +1,7 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -fobjc-arc -x objective-c %s.result
-// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fsyntax-only -fobjc-gc-only -x objective-c %s > %t
+// RUN: %clang_cc1 -triple x86_64-apple-macosx10.7 -fsyntax-only -fobjc-runtime-has-weak -fobjc-arc -x objective-c %s.result
+// RUN: arcmt-test --args -triple x86_64-apple-macosx10.7 -fsyntax-only -fobjc-gc-only -x objective-c %s > %t
 // RUN: diff %t %s.result
-// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fsyntax-only -fobjc-gc-only -x objective-c++ %s > %t
+// RUN: arcmt-test --args -triple x86_64-apple-macosx10.7 -fsyntax-only -fobjc-gc-only -x objective-c++ %s > %t
 // RUN: diff %t %s.result
 
 #include "Common.h"
@@ -41,3 +41,10 @@
   test1(0);
 }
 @end
+
+__attribute__((objc_arc_weak_reference_unavailable))
+@interface QQ {
+  __weak id s;
+  __weak QQ *q;
+}
+@end