summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorSteve Naroff <snaroff@apple.com>2008-07-16 18:58:11 +0000
committerSteve Naroff <snaroff@apple.com>2008-07-16 18:58:11 +0000
commit8dd1525b9acc06b9c5a19987095f72ef4811279e (patch)
tree8ffb18a592934c6b738b1ff1ccc29c6678c64ba6 /clang
parentde7d0f69badc320cf22b1cafefa15e39619ba5b1 (diff)
downloadbcm5719-llvm-8dd1525b9acc06b9c5a19987095f72ef4811279e.tar.gz
bcm5719-llvm-8dd1525b9acc06b9c5a19987095f72ef4811279e.zip
RewriteObjC::Initialize(): add function decls used by @synchronized.
This fixes <rdar://problem/6040143> clang ObjC rewriter: @synchronized keyword inserts undeclared objc functions. llvm-svn: 53695
Diffstat (limited to 'clang')
-rw-r--r--clang/Driver/RewriteObjC.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/Driver/RewriteObjC.cpp b/clang/Driver/RewriteObjC.cpp
index 535cc0be3dc..48cb9df0740 100644
--- a/clang/Driver/RewriteObjC.cpp
+++ b/clang/Driver/RewriteObjC.cpp
@@ -337,6 +337,9 @@ void RewriteObjC::Initialize(ASTContext &context) {
Preamble += "__OBJC_RW_EXTERN struct objc_object *objc_exception_extract(void *);\n";
Preamble += "__OBJC_RW_EXTERN int objc_exception_match";
Preamble += "(struct objc_class *, struct objc_object *);\n";
+ // @synchronized hooks.
+ Preamble += "__OBJC_RW_EXTERN void objc_sync_enter(struct objc_object *);\n";
+ Preamble += "__OBJC_RW_EXTERN void objc_sync_exit(struct objc_object *);\n";
Preamble += "__OBJC_RW_EXTERN Protocol *objc_getProtocol(const char *);\n";
Preamble += "#ifndef __FASTENUMERATIONSTATE\n";
Preamble += "struct __objcFastEnumerationState {\n\t";
OpenPOWER on IntegriCloud