[arcmt] iOS is always safe to use 'weak'. rdar://10950825

llvm-svn: 152878
This commit is contained in:
Argyrios Kyrtzidis 2012-03-16 00:10:35 +00:00
parent a7e57ace28
commit 99282b783e
1 changed files with 4 additions and 0 deletions

View 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>()) {