OSDN Git Service

[ObjCARC] Account for funclet token in storeStrong transform
authorShoaib Meenai <smeenai@fb.com>
Fri, 20 Apr 2018 22:11:03 +0000 (22:11 +0000)
committerShoaib Meenai <smeenai@fb.com>
Fri, 20 Apr 2018 22:11:03 +0000 (22:11 +0000)
commit72054c3dbb368672d2299f64c3957d00a8293bed
treed3061576557e88e4d1bf2e19b3d27e6e5d5321c1
parent68c6a26f03174d55268ed822ae374c9d215ed3b9
[ObjCARC] Account for funclet token in storeStrong transform

When creating a call to storeStrong in ObjCARCContract, ensure the call
gets the correct funclet token, otherwise WinEHPrepare will turn the
call (and all subsequent instructions) into unreachable.

We already have logic to do this for the ARC autorelease elision marker;
factor that out into a common function that's used for both. These are
the only two places in this transform that create call instructions.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330487 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/ObjCARC/ObjCARCContract.cpp
test/Transforms/ObjCARC/contract-storestrong-funclet.ll [new file with mode: 0644]