Turn off warning about weak_import attribute

on objc classes for Darwin. Radar 7839485.

llvm-svn: 101164
This commit is contained in:
Fariborz Jahanian 2010-04-13 19:02:07 +00:00
parent 4d89dd8353
commit dd9a259975
1 changed files with 1 additions and 3 deletions

View File

@ -901,9 +901,7 @@ static void HandleWeakImportAttr(Decl *D, const AttributeList &Attr, Sema &S) {
return;
} else if (!(S.LangOpts.ObjCNonFragileABI && isa<ObjCInterfaceDecl>(D))) {
if (S.Context.Target.getTriple().getOS() != llvm::Triple::Darwin ||
!isa<ObjCInterfaceDecl>(D) ||
S.Context.Target.getTriple().getDarwinMajorNumber() <= 10) {
!isa<ObjCInterfaceDecl>(D)) {
S.Diag(Attr.getLoc(), diag::warn_attribute_wrong_decl_type)
<< Attr.getName() << 2 /*variable and function*/;
return;