[PATCH] D47233: [CodeGen] Emit MSVC RTTI for Obj-C EH types

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 11 15:44:54 PDT 2018


rjmccall added a comment.

The non-fragile Objective-C path — i.e. interoperation with C++ exceptions instead of using `setjmp`/`longjmp` in an utterly-incompatible style — is absolutely the right direction going forward.

How does "wrapping an Objective-C exception inside a C++ exception" work?  Do you mean that you'll throw and catch a well-known C++ exception type and then separately test for subclassing in the catch clause?  How do you intend to handle successive catch clauses in that case?  Note that you cannot just wrap the Objective-C exception inside a separate C++ exception corresponding to the static type of the exception: unlike C++ pointers (even polymorphic ones), exception matching for ObjC pointers is based on the dynamic type of the exception.


Repository:
  rC Clang

https://reviews.llvm.org/D47233





More information about the cfe-commits mailing list