diff options
| author | Aaron Ballman <aaron@aaronballman.com> | 2012-09-06 16:44:16 +0000 |
|---|---|---|
| committer | Aaron Ballman <aaron@aaronballman.com> | 2012-09-06 16:44:16 +0000 |
| commit | 9c00446d2aafd0f055afc295edef8d9640394c81 (patch) | |
| tree | a44a0510fd33ba8251cf52960a484d2e207a3169 /clang/lib | |
| parent | 66c93f443d1e1c272c0134f307e12495ce6be56a (diff) | |
| download | bcm5719-llvm-9c00446d2aafd0f055afc295edef8d9640394c81.tar.gz bcm5719-llvm-9c00446d2aafd0f055afc295edef8d9640394c81.zip | |
Fixing the return type information for objc_sync_enter and objc_sync_exit. Patch thanks to Joe Ranieri!
llvm-svn: 163330
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/CodeGen/CGObjCMac.cpp | 8 | ||||
| -rw-r--r-- | clang/lib/Rewrite/Frontend/RewriteModernObjC.cpp | 4 | ||||
| -rw-r--r-- | clang/lib/Rewrite/Frontend/RewriteObjC.cpp | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/clang/lib/CodeGen/CGObjCMac.cpp b/clang/lib/CodeGen/CGObjCMac.cpp index 9a61e34ab2e..08e706c82e7 100644 --- a/clang/lib/CodeGen/CGObjCMac.cpp +++ b/clang/lib/CodeGen/CGObjCMac.cpp @@ -433,19 +433,19 @@ public: /// SyncEnterFn - LLVM object_sync_enter function. llvm::Constant *getSyncEnterFn() { - // void objc_sync_enter (id) + // int objc_sync_enter (id) llvm::Type *args[] = { ObjectPtrTy }; llvm::FunctionType *FTy = - llvm::FunctionType::get(CGM.VoidTy, args, false); + llvm::FunctionType::get(CGM.IntTy, args, false); return CGM.CreateRuntimeFunction(FTy, "objc_sync_enter"); } /// SyncExitFn - LLVM object_sync_exit function. llvm::Constant *getSyncExitFn() { - // void objc_sync_exit (id) + // int objc_sync_exit (id) llvm::Type *args[] = { ObjectPtrTy }; llvm::FunctionType *FTy = - llvm::FunctionType::get(CGM.VoidTy, args, false); + llvm::FunctionType::get(CGM.IntTy, args, false); return CGM.CreateRuntimeFunction(FTy, "objc_sync_exit"); } diff --git a/clang/lib/Rewrite/Frontend/RewriteModernObjC.cpp b/clang/lib/Rewrite/Frontend/RewriteModernObjC.cpp index c735da03fd7..0dbdbaee332 100644 --- a/clang/lib/Rewrite/Frontend/RewriteModernObjC.cpp +++ b/clang/lib/Rewrite/Frontend/RewriteModernObjC.cpp @@ -5891,8 +5891,8 @@ void RewriteModernObjC::Initialize(ASTContext &context) { Preamble += "(const char *);\n"; Preamble += "__OBJC_RW_DLLIMPORT void objc_exception_throw( struct objc_object *);\n"; // @synchronized hooks. - Preamble += "__OBJC_RW_DLLIMPORT void objc_sync_enter( struct objc_object *);\n"; - Preamble += "__OBJC_RW_DLLIMPORT void objc_sync_exit( struct objc_object *);\n"; + Preamble += "__OBJC_RW_DLLIMPORT int objc_sync_enter( struct objc_object *);\n"; + Preamble += "__OBJC_RW_DLLIMPORT int objc_sync_exit( struct objc_object *);\n"; Preamble += "__OBJC_RW_DLLIMPORT Protocol *objc_getProtocol(const char *);\n"; Preamble += "#ifndef __FASTENUMERATIONSTATE\n"; Preamble += "struct __objcFastEnumerationState {\n\t"; diff --git a/clang/lib/Rewrite/Frontend/RewriteObjC.cpp b/clang/lib/Rewrite/Frontend/RewriteObjC.cpp index 0b9e6564183..5a0ac541be2 100644 --- a/clang/lib/Rewrite/Frontend/RewriteObjC.cpp +++ b/clang/lib/Rewrite/Frontend/RewriteObjC.cpp @@ -5112,8 +5112,8 @@ void RewriteObjCFragileABI::Initialize(ASTContext &context) { Preamble += "__OBJC_RW_DLLIMPORT int objc_exception_match"; Preamble += "(struct objc_class *, struct objc_object *);\n"; // @synchronized hooks. - Preamble += "__OBJC_RW_DLLIMPORT void objc_sync_enter(struct objc_object *);\n"; - Preamble += "__OBJC_RW_DLLIMPORT void objc_sync_exit(struct objc_object *);\n"; + Preamble += "__OBJC_RW_DLLIMPORT int objc_sync_enter(struct objc_object *);\n"; + Preamble += "__OBJC_RW_DLLIMPORT int objc_sync_exit(struct objc_object *);\n"; Preamble += "__OBJC_RW_DLLIMPORT Protocol *objc_getProtocol(const char *);\n"; Preamble += "#ifndef __FASTENUMERATIONSTATE\n"; Preamble += "struct __objcFastEnumerationState {\n\t"; |

