diff options
author | Steve Naroff <snaroff@apple.com> | 2009-12-06 01:33:56 +0000 |
---|---|---|
committer | Steve Naroff <snaroff@apple.com> | 2009-12-06 01:33:56 +0000 |
commit | 2b3843df1ba86337f0b7f20457cda0280d0417b9 (patch) | |
tree | 5d268360cd44abff3dbdad6ed8e5b2d1f9a9c4d7 /clang/lib/Frontend/RewriteObjC.cpp | |
parent | fe5f7d916fced861b9e75da6f83f783dae940f59 (diff) | |
download | bcm5719-llvm-2b3843df1ba86337f0b7f20457cda0280d0417b9.tar.gz bcm5719-llvm-2b3843df1ba86337f0b7f20457cda0280d0417b9.zip |
Integrate the following from the 'objective-rewrite' branch:
http://llvm.org/viewvc/llvm-project?view=rev&revision=72893
llvm-svn: 90690
Diffstat (limited to 'clang/lib/Frontend/RewriteObjC.cpp')
-rw-r--r-- | clang/lib/Frontend/RewriteObjC.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/clang/lib/Frontend/RewriteObjC.cpp b/clang/lib/Frontend/RewriteObjC.cpp index 08b54b22224..9fc0669ca34 100644 --- a/clang/lib/Frontend/RewriteObjC.cpp +++ b/clang/lib/Frontend/RewriteObjC.cpp @@ -555,10 +555,17 @@ void RewriteObjC::Initialize(ASTContext &context) { Preamble += " void *FuncPtr;\n"; Preamble += "};\n"; Preamble += "// Runtime copy/destroy helper functions (from Block_private.h)\n"; - Preamble += "__OBJC_RW_STATICIMPORT void _Block_object_assign(void *, const void *, const int);\n"; - Preamble += "__OBJC_RW_STATICIMPORT void _Block_object_dispose(const void *, const int);\n"; - Preamble += "__OBJC_RW_STATICIMPORT void *_NSConcreteGlobalBlock[32];\n"; - Preamble += "__OBJC_RW_STATICIMPORT void *_NSConcreteStackBlock[32];\n"; + Preamble += "#ifdef CF_EXPORT_CONSTANT_STRING\n"; + Preamble += "extern \"C\" __declspec(dllexport) void _Block_object_assign(void *, const void *, const int);\n"; + Preamble += "extern \"C\" __declspec(dllexport) void _Block_object_dispose(const void *, const int);\n"; + Preamble += "extern \"C\" __declspec(dllexport) void *_NSConcreteGlobalBlock[32];\n"; + Preamble += "extern \"C\" __declspec(dllexport) void *_NSConcreteStackBlock[32];\n"; + Preamble += "#else\n"; + Preamble += "__OBJC_RW_DLLIMPORT void _Block_object_assign(void *, const void *, const int);\n"; + Preamble += "__OBJC_RW_DLLIMPORT void _Block_object_dispose(const void *, const int);\n"; + Preamble += "__OBJC_RW_DLLIMPORT void *_NSConcreteGlobalBlock[32];\n"; + Preamble += "__OBJC_RW_DLLIMPORT void *_NSConcreteStackBlock[32];\n"; + Preamble += "#endif\n"; Preamble += "#endif\n"; if (LangOpts.Microsoft) { Preamble += "#undef __OBJC_RW_DLLIMPORT\n"; |