]> granicus.if.org Git - clang/commit
[CodeGen] Always use MSVC personality for windows-msvc targets
authorShoaib Meenai <smeenai@fb.com>
Fri, 8 Jun 2018 00:41:01 +0000 (00:41 +0000)
committerShoaib Meenai <smeenai@fb.com>
Fri, 8 Jun 2018 00:41:01 +0000 (00:41 +0000)
commite60876cd455f4db0122f1e687957c0d8c2a57976
tree2cfd4df84c7d2521dcdb4cefec3f6d43ef7cbd9f
parent823b8b1afba83604564779a568062eb3d51675e0
[CodeGen] Always use MSVC personality for windows-msvc targets

The windows-msvc target is meant to be ABI compatible with MSVC,
including the exception handling. Ensure that a windows-msvc triple
always equates to the MSVC personality being used.

This mostly affects the GNUStep and ObjFW Obj-C runtimes. To the best of
my knowledge, those are normally not used with windows-msvc triples. I
believe WinObjC is based on GNUStep (or it at least uses libobjc2), but
that also takes the approach of wrapping Obj-C exceptions in C++
exceptions, so the MSVC personality function is the right one to use
there as well.

Differential Revision: https://reviews.llvm.org/D47862

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@334253 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGException.cpp
test/CodeGenObjC/personality.m
test/CodeGenObjCXX/personality.mm