[cfe-commits] r152459 - /cfe/trunk/lib/Rewrite/RewriteModernObjC.cpp
Fariborz Jahanian
fjahanian at apple.com
Fri Mar 9 16:39:34 PST 2012
Author: fjahanian
Date: Fri Mar 9 18:39:34 2012
New Revision: 152459
URL: http://llvm.org/viewvc/llvm-project?rev=152459&view=rev
Log:
objc modern rewriter: Mark class and ivar definitions with __declspec(dllexport)
// rdar://11023563
Modified:
cfe/trunk/lib/Rewrite/RewriteModernObjC.cpp
Modified: cfe/trunk/lib/Rewrite/RewriteModernObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Rewrite/RewriteModernObjC.cpp?rev=152459&r1=152458&r2=152459&view=diff
==============================================================================
--- cfe/trunk/lib/Rewrite/RewriteModernObjC.cpp (original)
+++ cfe/trunk/lib/Rewrite/RewriteModernObjC.cpp Fri Mar 9 18:39:34 2012
@@ -5703,7 +5703,7 @@
Result += ";\n";
}
- Result += "\nstruct _class_t "; Result += VarName; Result += CDecl->getNameAsString();
+ Result += "\n__declspec(dllexport) struct _class_t "; Result += VarName; Result += CDecl->getNameAsString();
Result += " __attribute__ ((used, section (\"__DATA,__objc_data\"))) = {\n";
Result += "\t";
if (metadata) {
@@ -5849,7 +5849,7 @@
Result += "\n";
for (unsigned i =0, e = Ivars.size(); i < e; i++) {
ObjCIvarDecl *IvarDecl = Ivars[i];
- Result += "unsigned long int "; Result += VarName;
+ Result += "__declspec(dllexport) unsigned long int "; Result += VarName;
Result += ClassName; Result += "_";
Result += IvarDecl->getName();
Result += " __attribute__ ((used, section (\"__DATA,__objc_ivar\")))";
More information about the cfe-commits
mailing list