OSDN Git Service

[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)
commit287b901befd9a8038ef4690239960d41cd2d0506
treeaf8cff256c7357a9feaf5f39946127c9e1f8032e
parent13041108bafb92d32f00148664f2023ada939fd6
[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

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