[CodeGen] Add funclet token to ARC marker
authorShoaib Meenai <smeenai@fb.com>
Mon, 19 Mar 2018 19:34:39 +0000 (19:34 +0000)
committerShoaib Meenai <smeenai@fb.com>
Mon, 19 Mar 2018 19:34:39 +0000 (19:34 +0000)
commitf698569b7b9267c1c025209b4e73fa4ec3f67ba7
tree89501087f56369512df0cdcb10ac1f1d090d105c
parentf2d85e78dfeb99959b84fe5f2277449457e83ddf
[CodeGen] 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. r324689 fixed this issue for regular inline assembly
blocks.

Note that clang only emits the marker at -O0, so this only fixes that
case. The optimizations case (where the marker is emitted by the
backend) will be fixed in a separate change.

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

llvm-svn: 327892
clang/lib/CodeGen/CGObjC.cpp
clang/test/CodeGenObjCXX/arc-marker-funclet.mm [new file with mode: 0644]