]> granicus.if.org Git - clang/commitdiff
Turn off warning about weak_import attribute
authorFariborz Jahanian <fjahanian@apple.com>
Tue, 13 Apr 2010 19:02:07 +0000 (19:02 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Tue, 13 Apr 2010 19:02:07 +0000 (19:02 +0000)
on objc classes for Darwin. Radar 7839485.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101164 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaDeclAttr.cpp

index aceaafcf3a165b0554fc23ae3da8cc1b787cec2e..c721f57e9cb51759b17e7075d092bf314d0212be 100644 (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;