[cfe-commits] r54367 - /cfe/trunk/Driver/RewriteObjC.cpp
Steve Naroff
snaroff at apple.com
Tue Aug 5 13:04:48 PDT 2008
Author: snaroff
Date: Tue Aug 5 15:04:48 2008
New Revision: 54367
URL: http://llvm.org/viewvc/llvm-project?rev=54367&view=rev
Log:
Finish fixing <rdar://problem/5929344> clang ObjC rewriter: "extern int __CFConstantStringClassReference[];" should be extern "C"
Modified:
cfe/trunk/Driver/RewriteObjC.cpp
Modified: cfe/trunk/Driver/RewriteObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Driver/RewriteObjC.cpp?rev=54367&r1=54366&r2=54367&view=diff
==============================================================================
--- cfe/trunk/Driver/RewriteObjC.cpp (original)
+++ cfe/trunk/Driver/RewriteObjC.cpp Tue Aug 5 15:04:48 2008
@@ -358,7 +358,11 @@
Preamble += " char *str;\n";
Preamble += " long length;\n";
Preamble += "};\n";
+ Preamble += "#ifdef CF_EXPORT_CONSTANT_STRING\n";
+ Preamble += "extern \"C\" __declspec(dllexport) int __CFConstantStringClassReference[];\n";
+ Preamble += "#else\n";
Preamble += "__OBJC_RW_EXTERN int __CFConstantStringClassReference[];\n";
+ Preamble += "#endif\n";
Preamble += "#define __NSCONSTANTSTRINGIMPL\n";
Preamble += "#endif\n";
if (LangOpts.Microsoft) {
More information about the cfe-commits
mailing list