[cfe-commits] r153454 - /cfe/trunk/lib/Rewrite/RewriteModernObjC.cpp
Daniel Dunbar
daniel at zuster.org
Mon Mar 26 11:48:59 PDT 2012
Author: ddunbar
Date: Mon Mar 26 13:48:59 2012
New Revision: 153454
URL: http://llvm.org/viewvc/llvm-project?rev=153454&view=rev
Log:
Revert r153443 "objective-c modern translator: extern "C" exported", it fails in testing.
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=153454&r1=153453&r2=153454&view=diff
==============================================================================
--- cfe/trunk/lib/Rewrite/RewriteModernObjC.cpp (original)
+++ cfe/trunk/lib/Rewrite/RewriteModernObjC.cpp Mon Mar 26 13:48:59 2012
@@ -3200,7 +3200,6 @@
e = Ivars.end(); i != e; i++) {
ObjCIvarDecl *IvarDecl = (*i);
Result += "\n";
- Result += "extern \"C\" ";
if (LangOpts.MicrosoftExt)
Result += "__declspec(allocate(\".objc_ivar$B\")) ";
if (LangOpts.MicrosoftExt &&
@@ -3210,7 +3209,7 @@
if (CDecl->getImplementation())
Result += "__declspec(dllexport) ";
}
- Result += "unsigned long ";
+ Result += "extern unsigned long ";
WriteInternalIvarName(CDecl, IvarDecl, Result);
Result += ";";
}
@@ -5421,7 +5420,7 @@
Result += "\tconst struct _prop_list_t *properties;\n";
Result += "};\n";
- Result += "extern \"C\" __declspec(dllimport) struct objc_cache _objc_empty_cache;\n";
+ Result += "__declspec(dllimport) extern struct objc_cache _objc_empty_cache;\n";
meta_data_declared = true;
}
@@ -5661,29 +5660,26 @@
if (metaclass && rootClass) {
// Need to handle a case of use of forward declaration.
Result += "\n";
- Result += "extern \"C\" ";
if (CDecl->getImplementation())
Result += "__declspec(dllexport) ";
- Result += "struct _class_t OBJC_CLASS_$_";
+ Result += "extern struct _class_t OBJC_CLASS_$_";
Result += CDecl->getNameAsString();
Result += ";\n";
}
// Also, for possibility of 'super' metadata class not having been defined yet.
if (!rootClass) {
Result += "\n";
- Result += "extern \"C\" ";
if (CDecl->getSuperClass()->getImplementation())
Result += "__declspec(dllexport) ";
- Result += "struct _class_t ";
+ Result += "extern struct _class_t ";
Result += VarName;
Result += CDecl->getSuperClass()->getNameAsString();
Result += ";\n";
if (metaclass) {
- Result += "extern \"C\" ";
if (RootClass->getImplementation())
Result += "__declspec(dllexport) ";
- Result += "struct _class_t ";
+ Result += "extern struct _class_t ";
Result += VarName;
Result += RootClass->getNameAsString();
Result += ";\n";
@@ -5794,11 +5790,10 @@
// must declare an extern class object in case this class is not implemented
// in this TU.
Result += "\n";
- Result += "extern \"C\" ";
if (ClassDecl->getImplementation())
Result += "__declspec(dllexport) ";
- Result += "struct _class_t ";
+ Result += "extern struct _class_t ";
Result += "OBJC_CLASS_$_"; Result += ClassName;
Result += ";\n";
More information about the cfe-commits
mailing list