[ObjCARC] Add funclet token to ARC marker
authorShoaib Meenai <smeenai@fb.com>
Tue, 20 Mar 2018 20:45:41 +0000 (20:45 +0000)
committerShoaib Meenai <smeenai@fb.com>
Tue, 20 Mar 2018 20:45:41 +0000 (20:45 +0000)
commit3f689c86323981117b318c618510f7b4bed909e0
tree68f09fcfe1f362106915fb877db0e146f1b3bca3
parent8ef820a6ede43802172161d2477c2cf9cd066790
[ObjCARC] Add funclet token to ARC marker

The inline assembly generated for the ARC autorelease elision marker
must have a funclet token if it's emitted inside a funclet, otherwise
the inline assembly (and all subsequent code in the funclet) will be
marked unreachable by WinEHPrepare.

Note that this only applies for the non-O0 case, since at O0, clang
emits the autorelease elision marker itself rather than deferring to the
backend. The fix for clang is handled in a separate change.

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

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