objc modern rewriter: Mark class and ivar definitions with __declspec(dllexport)

// rdar://11023563

llvm-svn: 152459
This commit is contained in:
Fariborz Jahanian 2012-03-10 00:39:34 +00:00
parent 9f3e5744ab
commit 34327fcdae
1 changed files with 2 additions and 2 deletions

View File

@ -5703,7 +5703,7 @@ static void Write_class_t(ASTContext *Context, std::string &Result,
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 @@ static void Write_IvarOffsetVar(std::string &Result,
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\")))";