diff options
author | Steve Naroff <snaroff@apple.com> | 2008-07-16 18:58:11 +0000 |
---|---|---|
committer | Steve Naroff <snaroff@apple.com> | 2008-07-16 18:58:11 +0000 |
commit | 59f05a48a7b0353090da2b8f878c2d760e55731c (patch) | |
tree | 64a7e5a10104134dfa7540286b0ed97a4b2ca2c4 /Driver/RewriteObjC.cpp | |
parent | 8f3b2654a9ff6912862f366102f5c46f7757260a (diff) |
RewriteObjC::Initialize(): add function decls used by @synchronized.
This fixes <rdar://problem/6040143> clang ObjC rewriter: @synchronized keyword inserts undeclared objc functions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53695 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Driver/RewriteObjC.cpp')
-rw-r--r-- | Driver/RewriteObjC.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Driver/RewriteObjC.cpp b/Driver/RewriteObjC.cpp index 535cc0be3d..48cb9df074 100644 --- a/Driver/RewriteObjC.cpp +++ b/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"; |