[cfe-commits] r89124 - in /cfe/trunk/lib/Sema: SemaDeclAttr.cpp SemaDeclObjC.cpp

Fariborz Jahanian fjahanian at apple.com
Tue Nov 17 11:08:09 PST 2009


Author: fjahanian
Date: Tue Nov 17 13:08:08 2009
New Revision: 89124

URL: http://llvm.org/viewvc/llvm-project?rev=89124&view=rev
Log:
Start support of weak_import objective-c classes.
(Radar 6815425).


Modified:
    cfe/trunk/lib/Sema/SemaDeclAttr.cpp
    cfe/trunk/lib/Sema/SemaDeclObjC.cpp

Modified: cfe/trunk/lib/Sema/SemaDeclAttr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclAttr.cpp?rev=89124&r1=89123&r2=89124&view=diff

==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclAttr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclAttr.cpp Tue Nov 17 13:08:08 2009
@@ -862,7 +862,7 @@
   } else if (isa<ObjCPropertyDecl>(D) || isa<ObjCMethodDecl>(D)) {
     // We ignore weak import on properties and methods
     return;
-  } else {
+  } else if (!(S.LangOpts.ObjCNonFragileABI && isa<ObjCInterfaceDecl>(D))) {
     S.Diag(Attr.getLoc(), diag::warn_attribute_wrong_decl_type)
     << Attr.getName() << 2 /*variable and function*/;
     return;

Modified: cfe/trunk/lib/Sema/SemaDeclObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclObjC.cpp?rev=89124&r1=89123&r2=89124&view=diff

==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclObjC.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclObjC.cpp Tue Nov 17 13:08:08 2009
@@ -112,6 +112,8 @@
       IDecl->setLocation(AtInterfaceLoc);
       IDecl->setForwardDecl(false);
       IDecl->setClassLoc(ClassLoc);
+      if (AttrList)
+        ProcessDeclAttributeList(TUScope, IDecl, AttrList);
     }
   } else {
     IDecl = ObjCInterfaceDecl::Create(Context, CurContext, AtInterfaceLoc,





More information about the cfe-commits mailing list