]> granicus.if.org Git - clang/commit
Simplify generate code for exceptions:
authorDaniel Dunbar <daniel@zuster.org>
Sat, 27 Sep 2008 07:36:24 +0000 (07:36 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Sat, 27 Sep 2008 07:36:24 +0000 (07:36 +0000)
commit129271a42975f8b9d42adc707be9883db91c8a5d
treed7d99342deec486d7e8a7a2d30bf4a8563f55c69
parentf93349f3ec4d69eafba42436c33aaa91bfca7e70
Simplify generate code for exceptions:
 - There is no need to branch on the rethrow variable to determine if
   we need to call objc_exception_try_exit. We know whether an
   exception was thrown, so just branch to a different target if we
   want to skip the try_exit.

   This is a slight semantic departure from gcc, but only for throwing
   nil, which is undefined (and for which gcc emits broken code).

 - Also fixes a bug in current code which was calling try_exit too
   many times when an exception was uncaught (but there were some
   handlers).

Fix bug introduced in prev. commit, the type of the @catch parameter
was uninitialized.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56754 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGObjCMac.cpp