]> granicus.if.org Git - clang/commitdiff
[arcmt] iOS is always safe to use 'weak'. rdar://10950825
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Fri, 16 Mar 2012 00:10:35 +0000 (00:10 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Fri, 16 Mar 2012 00:10:35 +0000 (00:10 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152878 91177308-0d34-0410-b5e6-96231b3b80d8

lib/ARCMigrate/Transforms.cpp

index c0adf16a11a954590bd3d78f3c7d3b0b6a885e81..170b7c8e15af84af8fb556cedb1050b322c7eaa5 100644 (file)
@@ -74,6 +74,10 @@ bool trans::canApplyWeak(ASTContext &Ctx, QualType type,
   if (T.isNull())
     return false;
 
+  // iOS is always safe to use 'weak'.
+  if (Ctx.getTargetInfo().getTriple().getOS() == llvm::Triple::IOS)
+    AllowOnUnknownClass = true;
+
   while (const PointerType *ptr = T->getAs<PointerType>())
     T = ptr->getPointeeType();
   if (const ObjCObjectPointerType *ObjT = T->getAs<ObjCObjectPointerType>()) {