[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)
commitd64b83266ba750acfbe2c8442290b594ccc89aac
tree65cf8662ac1a9f73a77816f8cddca5fe54e9b165
parent1803bfb75fcc21b2ce6b5d97efd2ea43031ca383
[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

llvm-svn: 330487
llvm/lib/Transforms/ObjCARC/ObjCARCContract.cpp
llvm/test/Transforms/ObjCARC/contract-storestrong-funclet.ll [new file with mode: 0644]