Finish fixing <rdar://problem/5929344> clang ObjC rewriter: "extern int __CFConstantStringClassReference[];" should be extern "C"

llvm-svn: 54367
This commit is contained in:
Steve Naroff 2008-08-05 20:04:48 +00:00
parent 9f6112c4e6
commit dd514e01f2

View File

@ -358,7 +358,11 @@ void RewriteObjC::Initialize(ASTContext &context) {
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) {