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

2018-09-27 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added inline comments. Comment at: lib/CodeGen/CGObjCMac.cpp:7457-7460 CGObjCNonFragileABIMac::GetEHType(QualType T) { // There's a particular fixed type info for 'id'. if (T->isObjCIdType() || T->isObjCQualifiedIdType()) { +if

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

2018-09-27 Thread David Chisnall via Phabricator via cfe-commits
theraven added a comment. In https://reviews.llvm.org/D47233#1129810, @DHowett-MSFT wrote: > We ran into some critical issues with this approach on x64. The pointers in > the exception record are supposed to be image-relative instead of absolute, > so I tried to make them absolute to

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

2018-07-17 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGObjCMac.cpp:7457-7460 CGObjCNonFragileABIMac::GetEHType(QualType T) { // There's a particular fixed type info for 'id'. if (T->isObjCIdType() || T->isObjCQualifiedIdType()) { +if

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

2018-07-16 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added inline comments. Comment at: lib/CodeGen/CGObjCMac.cpp:7457-7460 CGObjCNonFragileABIMac::GetEHType(QualType T) { // There's a particular fixed type info for 'id'. if (T->isObjCIdType() || T->isObjCQualifiedIdType()) { +if

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

2018-07-10 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added inline comments. Comment at: lib/CodeGen/CGObjCMac.cpp:7457-7460 CGObjCNonFragileABIMac::GetEHType(QualType T) { // There's a particular fixed type info for 'id'. if (T->isObjCIdType() || T->isObjCQualifiedIdType()) { +if

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

2018-06-22 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGObjCMac.cpp:7457-7460 CGObjCNonFragileABIMac::GetEHType(QualType T) { // There's a particular fixed type info for 'id'. if (T->isObjCIdType() || T->isObjCQualifiedIdType()) { +if

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

2018-06-22 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added inline comments. Comment at: lib/CodeGen/CGObjCMac.cpp:7457-7460 CGObjCNonFragileABIMac::GetEHType(QualType T) { // There's a particular fixed type info for 'id'. if (T->isObjCIdType() || T->isObjCQualifiedIdType()) { +if

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

2018-06-18 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGObjCMac.cpp:7457-7460 CGObjCNonFragileABIMac::GetEHType(QualType T) { // There's a particular fixed type info for 'id'. if (T->isObjCIdType() || T->isObjCQualifiedIdType()) { +if

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

2018-06-18 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. Ping. Repository: rC Clang https://reviews.llvm.org/D47233 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2018-06-12 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. In https://reviews.llvm.org/D47233#1129810, @DHowett-MSFT wrote: > In https://reviews.llvm.org/D47233#1129207, @rjmccall wrote: > > > In https://reviews.llvm.org/D47233#1129110, @smeenai wrote: > > > > > WinObjC does this wrapping, for example. > > > > > > I see. The

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

2018-06-12 Thread Dustin L. Howett via Phabricator via cfe-commits
DHowett-MSFT added a comment. In https://reviews.llvm.org/D47233#1129207, @rjmccall wrote: > In https://reviews.llvm.org/D47233#1129110, @smeenai wrote: > > > WinObjC does this wrapping, for example. > > > I see. The idea of creating the type descriptors and mangled names ad-hoc > for the

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

2018-06-11 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D47233#1129110, @smeenai wrote: > Wrapping an Objective-C exception inside a C++ exception means dynamically > constructing a C++ exception object and traversing the class hierarchy of the > thrown Obj-C object to populate the catchable

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

2018-06-11 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. Wrapping an Objective-C exception inside a C++ exception means dynamically constructing a C++ exception object and traversing the class hierarchy of the thrown Obj-C object to populate the catchable types array of the C++ exception. Microsoft's C++ runtime will perform

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

2018-06-11 Thread John McCall via Phabricator via cfe-commits
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?

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

2018-06-07 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. Ping @rjmccall Repository: rC Clang https://reviews.llvm.org/D47233 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2018-06-07 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai updated this revision to Diff 150399. smeenai added a comment. Address objc_exception attribute case Repository: rC Clang https://reviews.llvm.org/D47233 Files: lib/CodeGen/CGCXXABI.h lib/CodeGen/CGObjCMac.cpp lib/CodeGen/MicrosoftCXXABI.cpp test/CodeGenObjC/dllstorage.m

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

2018-05-30 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. In https://reviews.llvm.org/D47233#1115630, @DHowett-MSFT wrote: > This largely matches what we've done in the WinObjC clang patchset here > ,

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

2018-05-29 Thread Dustin L. Howett via Phabricator via cfe-commits
DHowett-MSFT accepted this revision. DHowett-MSFT added a comment. This revision is now accepted and ready to land. This largely matches what we've done in the WinObjC clang patchset here

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

2018-05-25 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. I think the approach makes sense. Comment at: lib/CodeGen/CGObjCMac.cpp:7457-7460 CGObjCNonFragileABIMac::GetEHType(QualType T) { // There's a particular fixed type info for 'id'. if (T->isObjCIdType() || T->isObjCQualifiedIdType()) { +if

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

2018-05-22 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai updated this revision to Diff 148133. smeenai added a comment. Colocate CHECK lines with declarations Repository: rC Clang https://reviews.llvm.org/D47233 Files: lib/CodeGen/CGCXXABI.h lib/CodeGen/CGObjCMac.cpp lib/CodeGen/MicrosoftCXXABI.cpp test/CodeGenObjC/dllstorage.m

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

2018-05-22 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai created this revision. smeenai added reviewers: DHowett-MSFT, compnerd, majnemer, rjmccall, rnk. We're implementing funclet-compatible code generation for Obj-C exceptions when using the MSVC ABI. The idea is that the Obj-C runtime will wrap Obj-C exceptions inside C++ exceptions, which