[cfe-commits] r70304 - /cfe/branches/Apple/objective-rewrite/tools/clang/Driver/RewriteObjC.cpp

Steve Naroff snaroff at apple.com
Tue Apr 28 10:44:48 PDT 2009


Author: snaroff
Date: Tue Apr 28 12:44:47 2009
New Revision: 70304

URL: http://llvm.org/viewvc/llvm-project?rev=70304&view=rev
Log:
Fix <rdar://problem/6632680> clang ObjC rewriter: unbalanced objc_exception_try_throw in @synchronized.

Modified:
    cfe/branches/Apple/objective-rewrite/tools/clang/Driver/RewriteObjC.cpp

Modified: cfe/branches/Apple/objective-rewrite/tools/clang/Driver/RewriteObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/objective-rewrite/tools/clang/Driver/RewriteObjC.cpp?rev=70304&r1=70303&r2=70304&view=diff

==============================================================================
--- cfe/branches/Apple/objective-rewrite/tools/clang/Driver/RewriteObjC.cpp (original)
+++ cfe/branches/Apple/objective-rewrite/tools/clang/Driver/RewriteObjC.cpp Tue Apr 28 12:44:47 2009
@@ -1488,6 +1488,8 @@
   SourceLocation lastCurlyLoc = startLoc;
   buf = "}\nelse {\n";
   buf += "  _rethrow = objc_exception_extract(&_stack);\n";
+  buf += "}\n";
+  buf += "{ /* implicit finally clause */\n";
   buf += "  if (!_rethrow) objc_exception_try_exit(&_stack);\n";
   buf += "  objc_sync_exit(";
   Expr *syncExpr = new CStyleCastExpr(Context->getObjCIdType(), 





More information about the cfe-commits mailing list