]> granicus.if.org Git - clang/commitdiff
Minor change to my last rewrite patch.
authorFariborz Jahanian <fjahanian@apple.com>
Sat, 10 Mar 2012 00:53:02 +0000 (00:53 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Sat, 10 Mar 2012 00:53:02 +0000 (00:53 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152461 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Rewrite/RewriteModernObjC.cpp

index 37b02b8ece823d13a3793e55710026089b46fe7a..11ee6b66234040e79a9954b9093853635c46e448 100644 (file)
@@ -5849,7 +5849,12 @@ static void Write_IvarOffsetVar(std::string &Result,
   Result += "\n";
   for (unsigned i =0, e = Ivars.size(); i < e; i++) {
     ObjCIvarDecl *IvarDecl = Ivars[i];
-    Result += "__declspec(dllexport) unsigned long int "; Result += VarName;
+    if (IvarDecl->getAccessControl() == ObjCIvarDecl::Private)
+      Result += "unsigned long int "; 
+    else
+      Result += "__declspec(dllexport) unsigned long int ";
+    
+    Result += VarName;
     Result += ClassName; Result += "_";
     Result += IvarDecl->getName(); 
     Result += " __attribute__ ((used, section (\"__DATA,__objc_ivar\")))";